<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5448226200237867837</id><updated>2024-11-08T21:08:32.013+05:30</updated><category term="spring boot"/><category term="java"/><category term="java interview question"/><category term="Microservice"/><category term="interview question"/><title type='text'>Java, Spring Boot | Spring Tutorials - Java-Scholars</title><subtitle type='html'>Learn online core and advanced tutorials of the java, spring boot, spring framework, maven, hibernate, JPA, microservices, spring REST, spring MVC, spring boot example, java interview questions, java software platform, classes, and technologies</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://java-scholars.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5448226200237867837/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='https://java-scholars.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Narendra Rathod</name><uri>http://www.blogger.com/profile/07520199330527180788</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5448226200237867837.post-5650018619740491546</id><published>2023-03-12T21:19:00.009+05:30</published><updated>2023-03-18T09:30:28.369+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Microservice"/><title type='text'>Microservice</title><content type='html'>&lt;body&gt;
&lt;amp-auto-ads type=&quot;adsense&quot;
        data-ad-client=&quot;ca-pub-5235698681758917&quot;&gt;
&lt;/amp-auto-ads&gt;  
&lt;h1 style=&quot;text-align: left;&quot;&gt;Use of Microservice&amp;nbsp;&lt;/h1&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;In Java, a microservice architecture typically involves breaking down an application into small, independent services that can be developed, deployed, and scaled independently. Each microservice typically handles a specific function or feature of the application and communicates with other microservices through APIs.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;How to Implement Microservice&amp;nbsp;&lt;/h3&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;To implement microservices in Java, you can use a variety of tools and frameworks, such as Spring Boot, Micronaut, Quarkus, or Vert.x.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;These frameworks provide features like dependency injection, configuration management, and service discovery to make it easier to develop and deploy microservices.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;To create a microservice in Java using Spring Boot, you can follow these basic steps:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Define the API endpoints: Define the endpoints that your microservice will expose to other services or clients.&amp;nbsp;&lt;/div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&amp;nbsp;Implement the business logic: Write the code that handles the functionality of your microservice.

Configure the application: Use Spring Boot annotations to configure the application and manage dependencies.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&amp;nbsp;Build and deploy: Build the application into a deployable format, such as a JAR file, and deploy it to a container, such as Docker or Kubernetes.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&amp;nbsp;Monitor and scale: Monitor the performance of your microservices and scale them up or down as needed to handle changing demand.&lt;/li&gt;&lt;/ol&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Overall, the microservice concept in Java involves building small, independent services that work together to provide a larger application. This approach can offer greater flexibility, scalability, and resilience than traditional monolithic architectures.&lt;/div&gt;&lt;/div&gt;
&lt;/body&gt;</content><link rel='replies' type='application/atom+xml' href='https://java-scholars.blogspot.com/feeds/5650018619740491546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://java-scholars.blogspot.com/2023/03/microservice.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5448226200237867837/posts/default/5650018619740491546'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5448226200237867837/posts/default/5650018619740491546'/><link rel='alternate' type='text/html' href='https://java-scholars.blogspot.com/2023/03/microservice.html' title='Microservice'/><author><name>Narendra Rathod</name><uri>http://www.blogger.com/profile/07520199330527180788</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5448226200237867837.post-5623760338927446943</id><published>2023-03-12T11:45:00.011+05:30</published><updated>2023-03-18T09:40:49.529+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="interview question"/><category scheme="http://www.blogger.com/atom/ns#" term="java interview question"/><title type='text'>Java Interview Question</title><content type='html'>&lt;body&gt;
  &lt;amp-auto-ads type=&quot;adsense&quot;
        data-ad-client=&quot;ca-pub-5235698681758917&quot;&gt;
&lt;/amp-auto-ads&gt;
&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Java Interview Question&lt;/span&gt;&lt;/h1&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;1. What is the difference between an abstract class and an interface?&lt;/h3&gt;&lt;div&gt;&lt;b&gt;Answer:&lt;/b&gt; An abstract class can have both abstract and non-abstract methods, whereas an interface can only have abstract methods. An abstract class can also have constructors, instance variables, and method implementations, whereas an interface cannot.&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Abstract Class Example&amp;nbsp;&lt;/b&gt;&lt;/h4&gt;&lt;div&gt;public abstract class Vehicles {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;private int numOfWheels;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;public Vehicles(int numOfWheels) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; this.numOfWheels = numOfWheels;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;public int getNumOfWheels() {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; return this.numOfWheels;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;public abstract void drive();&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Interface Example&lt;/b&gt;&lt;/h4&gt;&lt;div&gt;public interface Drivable {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;void drive();&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;2. What is the difference between a HashMap and a Hashtable?&lt;/h3&gt;&lt;div&gt;&lt;b&gt;Answer:&lt;/b&gt; HashMap is not thread-safe, whereas Hashtable is thread-safe. HashMap allows null values for both keys and values, whereas Hashtable does not allow null keys or values.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Example :&lt;/b&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Creating a HashMap and adding elements&lt;/h4&gt;&lt;div&gt;HashMap&amp;lt;String, Integer&amp;gt; myHashMap = new HashMap&amp;lt;&amp;gt;();&lt;/div&gt;&lt;div&gt;myHashMap.put(&quot;John&quot;, 25);&lt;/div&gt;&lt;div&gt;myHashMap.put(&quot;Ravi&quot;, 30);&lt;/div&gt;&lt;div&gt;int value = myHashMap.get(&quot;John&quot;);&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Creating a Hashtable and adding elements&lt;/h4&gt;&lt;div&gt;Hashtable&amp;lt;String, Integer&amp;gt; myHashTbl = new Hashtable&amp;lt;&amp;gt;();&lt;/div&gt;&lt;div&gt;myHashTbl.put(&quot;John&quot;, 25);&lt;/div&gt;&lt;div&gt;myHashTbl.put(&quot;Ravi&quot;, 30);&lt;/div&gt;&lt;div&gt;int value = myHashTbl.get(&quot;John&quot;);&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;3. What is the difference between an inner class and a nested class?&lt;/h3&gt;&lt;div&gt;&lt;b&gt;Answer:&lt;/b&gt; An inner class is a non-static nested class, whereas a nested class can be either static or non-static. An inner class has access to the instance variables and methods of the enclosing class, whereas a static nested class does not.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Example :&lt;/b&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Inner class&amp;nbsp;&lt;/h4&gt;&lt;div&gt;public class OuterClass {&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;private int x;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;public class InnerClass {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; public void printX() {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(x);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Nested class example&lt;/h4&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;public static class NestedClass {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; public void printHello() {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(&quot;Hello Java-Scholars&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;4. What is the difference between a StringBuilder and a StringBuffer?&lt;/h3&gt;&lt;div&gt;&lt;b&gt;Answer: &lt;/b&gt;StringBuilder is not thread-safe, whereas StringBuffer is thread-safe. StringBuilder is faster because it is not synchronized, whereas StringBuffer is slower because it is synchronized.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Example:&lt;/b&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Using StringBuilder&lt;/h4&gt;&lt;div&gt;StringBuilder sb = new StringBuilder();&lt;/div&gt;&lt;div&gt;sb.append(&quot;Hello&quot;);&lt;/div&gt;&lt;div&gt;sb.append(&quot; &quot;);&lt;/div&gt;&lt;div&gt;sb.append(&quot;Java-Scholars&quot;);&lt;/div&gt;&lt;div&gt;String result = sb.toString();&lt;/div&gt;&lt;div&gt;Using StringBuffer&lt;/div&gt;&lt;div&gt;StringBuffer sb = new StringBuffer();&lt;/div&gt;&lt;div&gt;sb.append(&quot;Hello&quot;);&lt;/div&gt;&lt;div&gt;sb.append(&quot; &quot;);&lt;/div&gt;&lt;div&gt;sb.append(&quot;Java-Scholars&quot;);&lt;/div&gt;&lt;div&gt;String result = sb.toString();&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;5. What is the difference between an ArrayList and a LinkedList?&lt;/h3&gt;&lt;div&gt;&lt;b&gt;Answer:&lt;/b&gt; ArrayList is implemented as a dynamic array, whereas LinkedList is implemented as a doubly-linked list. ArrayList is faster for random access and iteration, whereas LinkedList is faster for inserting and removing elements.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Example :&lt;/b&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Creating an ArrayList and adding elements&lt;/h4&gt;&lt;div&gt;ArrayList&amp;lt;Integer&amp;gt; myList = new ArrayList&amp;lt;Integer&amp;gt;();&lt;/div&gt;&lt;div&gt;myList.add(1);&lt;/div&gt;&lt;div&gt;myList.add(2);&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Creating a LinkedList and adding elements&lt;/h4&gt;&lt;div&gt;LinkedList&amp;lt;Integer&amp;gt; myList = new LinkedList&amp;lt;Integer&amp;gt;();&lt;/div&gt;&lt;div&gt;myList.add(1);&lt;/div&gt;&lt;div&gt;myList.add(2);&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;6. What is the difference between a checked and an unchecked exception?&lt;/h3&gt;&lt;div&gt;&lt;b&gt;Answer: &lt;/b&gt;A checked exception is a type of exception that must be declared in the method signature or caught in a try-catch block. An unchecked exception is a type of exception that does not need to be declared or caught.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Example :&lt;/b&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Checked exception&lt;/h4&gt;&lt;div&gt;public void myMethod() throws IOException {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;// Code here&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Unchecked exception&lt;/h4&gt;&lt;div&gt;public void myMethod() {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;throw new NullPointerException();&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/body&gt;</content><link rel='replies' type='application/atom+xml' href='https://java-scholars.blogspot.com/feeds/5623760338927446943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://java-scholars.blogspot.com/2023/03/java-interview-question.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5448226200237867837/posts/default/5623760338927446943'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5448226200237867837/posts/default/5623760338927446943'/><link rel='alternate' type='text/html' href='https://java-scholars.blogspot.com/2023/03/java-interview-question.html' title='Java Interview Question'/><author><name>Narendra Rathod</name><uri>http://www.blogger.com/profile/07520199330527180788</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5448226200237867837.post-3263567139984109731</id><published>2019-08-16T23:56:00.001+05:30</published><updated>2019-10-25T18:28:27.120+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><title type='text'>Java Features</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
The various features of java language are:&lt;br /&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;1) Simple:&lt;/b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/h4&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
The java language is called as a simple programming language because of the following reasons.&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;The syntax of java programming language similar to another programming language like c, c++, etc and simple to migrate from other languages.&lt;/li&gt;
&lt;li&gt;Complex topics like pointers, templates, etc. are eliminated from java making it simple.&lt;/li&gt;
&lt;li&gt;In the Java language, the programmer is responsible for the only allocation of memory. The deallocation of the memory is done by the garbage collector&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;2) Object-Oriented:&lt;/b&gt;&amp;nbsp;&lt;/h4&gt;
The java language is called an object-oriented language. Any language can be called object-oriented if the development of the application is based on objects and classes.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;b&gt;Object:&lt;/b&gt; Any entity that exists physically in this real-world which requires some memory is called an object. Every object contains some properties and some actions. The properties are the data which describes the object and the actions are the tasks or the operations performed by the objects.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Class:&lt;/b&gt;&amp;nbsp;A class is a collection of common properties and common actions of a group of objects. A class can be considered as a plan or model or a blueprint for creating the objects. For every class, we can create any number of objects and without a class, the object can&#39;t be created. Example: class: Student&amp;nbsp; object: tonny, rajiv&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFRi6ch0Gm8ff_D6HDhpcS1ExJIRp5dqAvdPltGzHg7X6z6Ts01UcCLAT4W3lhNZOU88G1XFDZX175tAZefTy_EVt0bIF-I2cot-xeyYhih9nqmRzWVXfStDnXWaU1F6WwHRCmtEt-3v8I/s1600/object-oriented.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;java-object-oriented&quot; border=&quot;0&quot; data-original-height=&quot;196&quot; data-original-width=&quot;371&quot; height=&quot;105&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFRi6ch0Gm8ff_D6HDhpcS1ExJIRp5dqAvdPltGzHg7X6z6Ts01UcCLAT4W3lhNZOU88G1XFDZX175tAZefTy_EVt0bIF-I2cot-xeyYhih9nqmRzWVXfStDnXWaU1F6WwHRCmtEt-3v8I/s200/object-oriented.jpg&quot; title=&quot;object-oriented&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;3) Secured:&lt;/b&gt;&amp;nbsp;&lt;/h4&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;Security one of the most important principles of any programming language. The java language contains inbuilt security programs for projecting the data from unauthorized usage.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;4) Distributed:&lt;/b&gt;&amp;nbsp;&lt;/h4&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;Using the distributed features we can access
the data available in multiple machines and it to the user. Using these features
we can improve the performance of the application by making the data more
available and more accessible.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;5) Platform Independent or machine-independent or Architecture
Neutral:&lt;/b&gt;&amp;nbsp;&lt;/h4&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;Java program can be executed on any machine irrespective of their
hardware, software, architecture, operating system, etc, therefore, it is called
a platform-independent language.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;C language:&lt;/b&gt; when we compile a C program, the compiler
verifies whether the ‘C’ language instruction valid are not if valid the compiler generates .exe file&amp;nbsp; containing
machine language instructions.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;!--[endif]--&gt;Demo.c ( c lang. inst.) &lt;span style=&quot;color: #cc0000;&quot;&gt;→&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;compiler&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #cc0000;&quot;&gt;→&lt;/span&gt;&amp;nbsp; Demo.exe(machine lang. inst.)&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
The machine language instructions available in the .exe
files generated by the compiler can be executed only in that machine, where it is
compiled. If we want to execute the C language makes it machine dependent
language.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;Java language:&lt;/b&gt; When we compile java program, the compiler verifies
whether the java language instructions are valid or not,&amp;nbsp; if valid the compiler will generate .class a file containing special java instructions(byte code instructions).&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape id=&quot;_x0000_s1027&quot;
 type=&quot;#_x0000_t32&quot; style=&#39;position:absolute;left:0;text-align:left;
 margin-left:113pt;margin-top:6.5pt;width:86.5pt;height:0;z-index:251659264&#39;
 o:connectortype=&quot;straight&quot;&gt;
 &lt;v:stroke endarrow=&quot;block&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style=&quot;height: 12px; left: 0px; margin-left: 149px; margin-top: 3px; mso-ignore: vglayout; position: absolute; width: 119px; z-index: 251659264;&quot;&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Demo.c ( c lang. inst.) &lt;span style=&quot;color: #cc0000;&quot;&gt;→&lt;/span&gt;&amp;nbsp; &amp;nbsp;compiler&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #cc0000;&quot;&gt;→&lt;/span&gt;&amp;nbsp; Demo.class(byte
code inst.)&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
The special java instructions
available in the .class file generated by the compiler can be executed on any
machine with the help of JVM, without recompile it. This nature of java
language makes it platform-independent.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;h4&gt;
&lt;b&gt;6) Interpreted:&lt;/b&gt;&amp;nbsp;&lt;/h4&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;The java language
said to interpreted language as the execution of the program is done by the interpreter
available inside the JVM.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;h4&gt;
&lt;b&gt;7) High performance:&lt;/b&gt;&amp;nbsp;&lt;/h4&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;The
execution of the program is done by the interpreter along with the special compiler
and JIT(Just-in-Time) compiler, thereby reducing the execution time and
improving the performance of the application.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;h4&gt;
&lt;b&gt;8) Portable:&lt;/b&gt;&amp;nbsp;&lt;/h4&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;We can develop an application which is a collection of components which can be replaced and
reused.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;h4&gt;
&lt;b&gt;9) Multithreaded:&lt;/b&gt;&amp;nbsp;&lt;/h4&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;Every thread in
java program is a control. if the program contains multiple controls then we
can reduce the waiting time, and provide response faster and thereby improving
the performance.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;h4&gt;
&lt;b&gt;10) Dynamic:&lt;/b&gt;&amp;nbsp;&lt;/h4&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;The java program is
said to be dynamic because the allocation of memory is done at execution time
according to the requirement.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;h4&gt;
&lt;b&gt;11) Robust:&lt;/b&gt;&amp;nbsp;&lt;/h4&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;The java language
said to be a strong programming language. Because of the following reasons:&lt;/span&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;Memory Management:&lt;/b&gt; In java
language allocation of memory and deallocation of memory, both are efficient. During
the memory allocation time, there will be no wastage of memory and deallocation
done by garbage collector which also efficient as the unused memory will be
removed.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Exception handling:&lt;/b&gt; the errors
the occurs at runtime because of logical failure, invalid input is called as the exception. When an exception occurs, the application will be terminated
abnormally and execution incompletely. In order to code execute completely and
terminate normally. We can take the help pf exception handling. The process of
execution handling in java is simple and efficient.&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://java-scholars.blogspot.com/feeds/3263567139984109731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://java-scholars.blogspot.com/2019/08/java-features.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5448226200237867837/posts/default/3263567139984109731'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5448226200237867837/posts/default/3263567139984109731'/><link rel='alternate' type='text/html' href='https://java-scholars.blogspot.com/2019/08/java-features.html' title='Java Features'/><author><name>Narendra Rathod</name><uri>http://www.blogger.com/profile/07520199330527180788</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFRi6ch0Gm8ff_D6HDhpcS1ExJIRp5dqAvdPltGzHg7X6z6Ts01UcCLAT4W3lhNZOU88G1XFDZX175tAZefTy_EVt0bIF-I2cot-xeyYhih9nqmRzWVXfStDnXWaU1F6WwHRCmtEt-3v8I/s72-c/object-oriented.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5448226200237867837.post-8909474612006323870</id><published>2019-08-16T20:54:00.002+05:30</published><updated>2019-08-17T00:30:27.071+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><title type='text'>Java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: center;&quot;&gt;
Java Introduction&lt;/h3&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaAD9Zy93u0XCBkfutBfcEXKBncrru2qwLusNStr1yn1baBcAy393mu6fvdq3XJECu7Cf7FwK0fHfFo_9lpKjTpm3oPXrYFy8KaD3d10far2pgEy2oOqloViEs9qEAyKBrDuTQCdDSrhat/s1600/java-oracle-logo.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;java-oracle-logo, java, java introduction&quot; border=&quot;0&quot; data-original-height=&quot;126&quot; data-original-width=&quot;188&quot; height=&quot;133&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaAD9Zy93u0XCBkfutBfcEXKBncrru2qwLusNStr1yn1baBcAy393mu6fvdq3XJECu7Cf7FwK0fHfFo_9lpKjTpm3oPXrYFy8KaD3d10far2pgEy2oOqloViEs9qEAyKBrDuTQCdDSrhat/s200/java-oracle-logo.png&quot; title=&quot;java-oracle-logo&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Java is an open-source API (application programming interface) provided by the &lt;b&gt;Oracle Corporation&lt;/b&gt;(currently) and its free API, anyone can use for the development of the business application/software.&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Java is an Object-Oriented programming language&lt;/b&gt;, which is executed by a machine to reduce the burden of a user or human being by performing the operations faster without any mistakes.&lt;br /&gt;
It is machine-independent programming, we can run java application on any machine with the help of java virtual machine(JVM).&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Program&lt;/b&gt;: A program is a set of instructions. &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Software&lt;/b&gt;:&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; I&lt;/span&gt;t is a set of programs, which can perform multiple tasks.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Software classified into two types:&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
1. System software &lt;/h3&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
The software is designed to interact or communicate with the hardware device and make them work is called system software. This software is generally developed in a language like c, c++, etc.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;Example&lt;/b&gt;: Operation System, driver, compiler, etc.&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
2. Application software &lt;/h3&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
The software which is designed to store data, provide entertainment, do business, generate reports, etc. are called as application software. This software generally developed in a language like java, .net, python, etc. &lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
The Application software’s are further classified into two types.&lt;/div&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;I. Standalone software&lt;/b&gt;:&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/h4&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
The software which can execute in the context of a single machine(computer) is called as standalone software.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;Example&lt;/b&gt;: MS-Word, media player, etc.&lt;/div&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
II. Web-based software:&amp;nbsp;&lt;/h4&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
The software which can be executed on any a machine in the context of browser is called as a web-based software.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;Example&lt;/b&gt;:&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;Gmail, Facebook, etc.&lt;/div&gt;
&lt;h3 style=&quot;text-align: center;&quot;&gt;
Java History&lt;/h3&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;
James Gosling, Mike Sheridan, and Patrick Naughton started the first java project in 1991 for the Digital Cable Television Industry. Java is an object-Oriented, multi-purpose, cross-platform programming language. Java versions are provided in the form of Java development tools (JDK) it&#39;s completely free(Open Source).&lt;br /&gt;
The java language is released by &lt;b&gt;Sun Microsystem&lt;/b&gt; in the year 1995 in three editions.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;b&gt;JSE(java standard edition):&amp;nbsp;&lt;/b&gt;This edition can use for developing standalone software.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;JEE(java enterprise edition):&amp;nbsp;&lt;/b&gt;This edition can&amp;nbsp;use for web-based application/software.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;JME(java mobile edition):&lt;/b&gt;&amp;nbsp;This edition used for developing an application for mobile devices, wireless devices, embedded controllers, etc. where memory is limited.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
Java Coding Example&lt;/h4&gt;
&lt;div id=&quot;javaCode&quot;&gt;
package in.blogspot.scholars.java;&lt;br /&gt;
&lt;br /&gt;
public class JavaCodeExample&lt;br /&gt;
{&lt;br /&gt;
public static void main(String[] args) &lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;hello java programming language”);&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://java-scholars.blogspot.com/feeds/8909474612006323870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://java-scholars.blogspot.com/2019/08/java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5448226200237867837/posts/default/8909474612006323870'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5448226200237867837/posts/default/8909474612006323870'/><link rel='alternate' type='text/html' href='https://java-scholars.blogspot.com/2019/08/java.html' title='Java'/><author><name>Narendra Rathod</name><uri>http://www.blogger.com/profile/07520199330527180788</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaAD9Zy93u0XCBkfutBfcEXKBncrru2qwLusNStr1yn1baBcAy393mu6fvdq3XJECu7Cf7FwK0fHfFo_9lpKjTpm3oPXrYFy8KaD3d10far2pgEy2oOqloViEs9qEAyKBrDuTQCdDSrhat/s72-c/java-oracle-logo.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5448226200237867837.post-5871293200658906028</id><published>2019-08-05T19:37:00.003+05:30</published><updated>2019-08-17T00:06:44.402+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="spring boot"/><title type='text'>Spring boot Example | Spring REST Example with Spring boot</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
In Spring Framework lots of modules like spring boot, spring web services, spring-security, spring Kafka, spring data, spring integration, spring cloud. etc. spring boot module used to create the spring-based web application.&lt;br /&gt;
Learn more about spring boot click on this link-&amp;nbsp;&lt;a href=&quot;https://java-scholars.blogspot.com/2019/08/spring-boot-example-spring-rest-example.html&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Why We Used Spring boot?&lt;/a&gt;&amp;nbsp;&lt;/div&gt;
&lt;h2 style=&quot;text-align: center;&quot;&gt;
Spring boot Example&lt;/h2&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
In this spring boot example provides,&amp;nbsp; how to create spring REST Application with spring boot using Maven project, spring REST, spring MVC, Devtools dependency, java 1.8, STS development tool, Spring Initializr, we are looking mainly used off the @Restcontroller, @Responsebody, @ComponentScan&amp;nbsp; annotation&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;h3 style=&quot;text-align: center;&quot;&gt;
Steps to Create the Springboot Application&lt;/h3&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
1. Let&#39;s create the &lt;b&gt;spring boot project&lt;/b&gt; using spring initializer,&amp;nbsp; Go to the &lt;a href=&quot;https://start.spring.io/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;start.spring.io&lt;/a&gt;&amp;nbsp;and select the Maven project, fill the project name, package name, packaging jar/war, add the basic dependency like Web, Devtools, Actuator. and click on the generate project button. start the downloading. once complete the download, extract the zip folder.&lt;br /&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrxufXPFsszSkULyHqXzJoZtWBsjKov1dVDQ-_-llv61UgzY9s2ySCKYwRsEwhH67sZVSgxXMDwhIo-T62I-LnCPQUQVCLymuvObbrM74xvCX-884UOSgJ2Fa4dV-_FtY9pzgdWsOVp1FL/s1600/spring-initialzr.jpg&quot; style=&quot;clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Spring initializr, spring boot example&quot; border=&quot;0&quot; data-original-height=&quot;1600&quot; data-original-width=&quot;979&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrxufXPFsszSkULyHqXzJoZtWBsjKov1dVDQ-_-llv61UgzY9s2ySCKYwRsEwhH67sZVSgxXMDwhIo-T62I-LnCPQUQVCLymuvObbrM74xvCX-884UOSgJ2Fa4dV-_FtY9pzgdWsOVp1FL/s400/spring-initialzr.jpg&quot; title=&quot;Spring initializr&quot; width=&quot;241&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Spring Initializr&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
2. Open the &lt;a href=&quot;https://spring.io/tools3/sts/all&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Spring Tool Suite (STS)&lt;/a&gt;, import the project as an &lt;b&gt;existing maven project&lt;/b&gt;.&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC_Yu3YM0lo8cWX53gg5BNVEEHXt4Xg13_zebXSDFIuw_cuDl4Zimp8Xx5bU-LHpD5h3hIvxziJGvLY95xwFaXXPK-OEY3Ifle7FWRPWAlLzTpAlsCI_zDeKJDApW4LMdhD_hxsniLQUgN/s1600/spring+boot+project.JPG&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;spring boot project, spring boot example&quot; border=&quot;0&quot; data-original-height=&quot;747&quot; data-original-width=&quot;468&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC_Yu3YM0lo8cWX53gg5BNVEEHXt4Xg13_zebXSDFIuw_cuDl4Zimp8Xx5bU-LHpD5h3hIvxziJGvLY95xwFaXXPK-OEY3Ifle7FWRPWAlLzTpAlsCI_zDeKJDApW4LMdhD_hxsniLQUgN/s400/spring+boot+project.JPG&quot; title=&quot;spring boot project&quot; width=&quot;250&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;spring-boot project&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
3. Add the remaining spring-boot maven dependencies in &lt;b&gt;pom.xml&lt;/b&gt; from the &lt;a href=&quot;https://mvnrepository.com/repos/central&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;central maven repository&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
&lt;pre style=&quot;background: #ffffff; color: black;&quot;&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;color: #7f0055; font-weight: bold;&quot;&gt;xml&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #7f0055; font-weight: bold;&quot;&gt;1.0&lt;/span&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;encoding&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;UTF-8&lt;/span&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;?&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;project&lt;/span&gt; xmlns=&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;http&lt;/span&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #7f0055; font-weight: bold;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: #3f3fbf;&quot;&gt;maven.apache.org&lt;/span&gt;&lt;span style=&quot;color: #3f3fbf;&quot;&gt;/POM/4.0.0&lt;/span&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;&lt;/span&gt;
 xmlns:xsi=&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;http&lt;/span&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #7f0055; font-weight: bold;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: #3f3fbf;&quot;&gt;www.w3.org&lt;/span&gt;&lt;span style=&quot;color: #3f3fbf;&quot;&gt;/2001/XMLSchema-instance&lt;/span&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;&lt;/span&gt;
 xsi:schemaLocation=&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;http&lt;/span&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #7f0055; font-weight: bold;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: #3f3fbf;&quot;&gt;maven.apache.org&lt;/span&gt;&lt;span style=&quot;color: #3f3fbf;&quot;&gt;/POM/4.0.0&lt;/span&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;http&lt;/span&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #7f0055; font-weight: bold;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: #3f3fbf;&quot;&gt;maven.apache.org&lt;/span&gt;&lt;span style=&quot;color: #3f3fbf;&quot;&gt;/xsd/maven-4.0.0.xsd&lt;/span&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
 &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;modelVersion&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;4.0.0&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;modelVersion&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
 &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;parent&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;spring-boot-starter-parent&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;2.1.4.RELEASE&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;relativePath&lt;/span&gt; &lt;span style=&quot;color: #7f0055;&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #3f7f59;&quot;&gt;&amp;lt;!--&lt;/span&gt;&lt;span style=&quot;color: #3f7f59;&quot;&gt; lookup parent from repository &lt;/span&gt;&lt;span style=&quot;color: #3f7f59;&quot;&gt;--&amp;gt;&lt;/span&gt;
 &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;parent&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
 &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;in.blogspot.scholars.java&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
 &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;springbootexample&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
 &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;0.0.1-SNAPSHOT&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
 &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;springbootexample&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
 &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;packaging&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;jar&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;packaging&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
 &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;description&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;springbootexample project for Spring Boot&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;description&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;

 &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;properties&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;project.build.sourceEncoding&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;UTF-8&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;project.build.sourceEncoding&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;project.reporting.outputEncoding&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;UTF-8&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;project.reporting.outputEncoding&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;java.version&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;1.8&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;java.version&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
 &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;properties&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;

 &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;dependencies&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;spring-boot-starter-actuator&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;spring-boot-starter-web&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;

  &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;spring-boot-devtools&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;scope&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;runtime&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;scope&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;optional&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;true&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;optional&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;spring-boot-starter-test&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;scope&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;test&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;scope&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #3f7f59;&quot;&gt;&amp;lt;!--&lt;/span&gt;&lt;span style=&quot;color: #3f7f59;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #3f3fbf;&quot;&gt;https://mvnrepository.com/artifact/org.apache.tomcat.embed/tomcat-embed-jasper&lt;/span&gt;&lt;span style=&quot;color: #3f7f59;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #3f7f59;&quot;&gt;--&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;org.apache.tomcat.embed&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;tomcat-embed-jasper&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;scope&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;provided&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;scope&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #3f7f59;&quot;&gt;&amp;lt;!--&lt;/span&gt;&lt;span style=&quot;color: #3f7f59;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #3f3fbf;&quot;&gt;https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-tomcat&lt;/span&gt;&lt;span style=&quot;color: #3f7f59;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #3f7f59;&quot;&gt;--&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;spring-boot-starter-tomcat&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #3f7f59;&quot;&gt;&amp;lt;!--&lt;/span&gt;&lt;span style=&quot;color: #3f7f59;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #3f3fbf;&quot;&gt;https://mvnrepository.com/artifact/javax.servlet/jstl&lt;/span&gt;&lt;span style=&quot;color: #3f7f59;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #3f7f59;&quot;&gt;--&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;javax.servlet&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;jstl&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #3f7f59;&quot;&gt;&amp;lt;!--&lt;/span&gt;&lt;span style=&quot;color: #3f7f59;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #3f3fbf;&quot;&gt;https://mvnrepository.com/artifact/javax.servlet/servlet-api&lt;/span&gt;&lt;span style=&quot;color: #3f7f59;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #3f7f59;&quot;&gt;--&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;javax.servlet&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;servlet-api&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;2.5&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;scope&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;provided&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;scope&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
 &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;dependencies&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;

 &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;build&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;plugins&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;plugin&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;spring-boot-maven-plugin&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
   &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;plugin&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;plugins&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
 &lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;build&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;

&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;project&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
4. Create an Employee bean class. i.e &lt;b&gt;Employee.java&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div id=&quot;javaCode&quot;&gt;
package in.blogspot.scholars.java.employee;&lt;br /&gt;
&lt;br /&gt;
public class Employee {&lt;br /&gt;
&lt;br /&gt;
private Integer id;&lt;br /&gt;
private String name;&lt;br /&gt;
private String dept;&lt;br /&gt;
private String address;&lt;br /&gt;
&lt;br /&gt;
public Integer getId() {&lt;br /&gt;
return id;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public void setId(Integer id) {&lt;br /&gt;
this.id = id;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public String getName() {&lt;br /&gt;
return name;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public void setName(String name) {&lt;br /&gt;
this.name = name;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public String getDept() {&lt;br /&gt;
return dept;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public void setDept(String dept) {&lt;br /&gt;
this.dept = dept;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public String getAddress() {&lt;br /&gt;
return address;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public void setAddress(String address) {&lt;br /&gt;
this.address = address;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
@Override&lt;br /&gt;
public String toString() {&lt;br /&gt;
return &quot;Employee [id=&quot; + id + &quot;, name=&quot; + name + &quot;, dept=&quot; + dept + &quot;, address=&quot; + address + &quot;]&quot;;&lt;br /&gt;
}&lt;br /&gt;
}&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
5. Create a service class that contains your business logic, that is &lt;b&gt;EmployeeServiceImpl.java&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;
&lt;div id=&quot;javaCode2&quot;&gt;
package in.blogspot.scholars.java.employee;&lt;br /&gt;
&lt;br /&gt;
import org.springframework.stereotype.Service;&lt;br /&gt;
&lt;br /&gt;
@Service&lt;br /&gt;
public class EmployeeServiceImpl {&lt;br /&gt;
&lt;br /&gt;
public Employee getEmployeeDetails() {&lt;br /&gt;
&lt;br /&gt;
Employee employee = new Employee();&lt;br /&gt;
employee.setId(1);&lt;br /&gt;
employee.setName(&quot;Narendra&quot;);&lt;br /&gt;
employee.setDept(&quot;IT&quot;);&lt;br /&gt;
employee.setAddress(&quot;India&quot;);&lt;br /&gt;
return employee;&lt;br /&gt;
}&lt;br /&gt;
}&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
6. Create a Constant class for URL mapping. It is the best programming practice to define all constants separately. i.e &lt;b&gt;UrlConstant.java&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div id=&quot;javaCode1&quot;&gt;
package in.blogspot.scholars.java.employee;&lt;br /&gt;
&lt;br /&gt;
public class UrlConstant {&lt;br /&gt;
&lt;br /&gt;
public static final String MESSAGE = &quot;/message&quot;;&lt;br /&gt;
public static final String EMPLOYEE_URL = &quot;/get-employee&quot;;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
7. Create the controller that handles all the requests coming from the dispatcher servlet and prepare the model &amp;amp; view object and sending a response to the dispatcher servlet. i.e. &lt;b&gt;EmployeeController.java&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Dispatcher servlet is a parent controller that handles every request coming from the server and sending the response to the server.&lt;/div&gt;
&lt;br /&gt;
&lt;div id=&quot;javaCode3&quot;&gt;
package in.blogspot.scholars.java.employee;&lt;br /&gt;
&lt;br /&gt;
import org.springframework.beans.factory.annotation.Autowired;&lt;br /&gt;
import org.springframework.web.bind.annotation.RequestMapping;&lt;br /&gt;
import org.springframework.web.bind.annotation.RequestMethod;&lt;br /&gt;
import org.springframework.web.bind.annotation.RestController;&lt;br /&gt;
&lt;br /&gt;
@RestController&lt;br /&gt;
public class EmployeeController {&lt;br /&gt;
&lt;br /&gt;
@Autowired&lt;br /&gt;
private EmployeeServiceImpl employeeServiceImpl;&lt;br /&gt;
&lt;br /&gt;
@RequestMapping(value = UrlConstant.MESSAGE, method = RequestMethod.GET)&lt;br /&gt;
public String getMessage() {&lt;br /&gt;
&lt;br /&gt;
return &quot;welcome to the https://java-scholars.blogspot.com&quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
@RequestMapping(value = UrlConstant.EMPLOYEE_URL, method = RequestMethod.GET)&lt;br /&gt;
public Employee getEmployeeDetails() {&lt;br /&gt;
&lt;br /&gt;
return employeeServiceImpl.getEmployeeDetails();&lt;br /&gt;
}&lt;br /&gt;
}&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
8. Finally, annotate the &lt;span style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;SpringbootexampleApplication.java&lt;/b&gt;&lt;/span&gt;&amp;nbsp;class with &lt;b&gt;@ComponentScan(&quot;base package name&quot;)&lt;/b&gt;.&lt;/div&gt;
&lt;br /&gt;
&lt;div id=&quot;javaCode4&quot;&gt;
package in.blogspot.scholars.java.springbootexample;&lt;br /&gt;
&lt;br /&gt;
import org.springframework.boot.SpringApplication;&lt;br /&gt;
import org.springframework.boot.autoconfigure.SpringBootApplication;&lt;br /&gt;
import org.springframework.context.annotation.ComponentScan;&lt;br /&gt;
&lt;br /&gt;
@SpringBootApplication&lt;br /&gt;
@ComponentScan(value= {&quot;in.blogspot.scholars.java.*&quot;})&lt;br /&gt;
public class SpringbootexampleApplication {&lt;br /&gt;
&lt;br /&gt;
public static void main(String[] args) {&lt;br /&gt;
SpringApplication.run(SpringbootexampleApplication.class, args);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;9. How to Run a spring boot application?&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
Once complete the coding, configuration of the spring application.&lt;b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Right-click on the &lt;b&gt;project&lt;/b&gt;, select &lt;b&gt;Run As&lt;/b&gt; and click on the &lt;b&gt;Spring boot App&lt;/b&gt; or Java Application.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnykQLgpp2MNANZzk7g6j_vd42EmWwt4vTWi0we-1YCoP7e_c7_tqotaRgwYh4QsxrOn2f_Vdv2i3JC1kQ17vd-j3ewsuzkLgh9db-ugUe1xjDkEAw3WIGb6fRT11CTYcUqSzkxwNCq1_Z/s1600/spring-boot-app-run.jpg&quot; style=&quot;clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;816&quot; data-original-width=&quot;1600&quot; height=&quot;201&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnykQLgpp2MNANZzk7g6j_vd42EmWwt4vTWi0we-1YCoP7e_c7_tqotaRgwYh4QsxrOn2f_Vdv2i3JC1kQ17vd-j3ewsuzkLgh9db-ugUe1xjDkEAw3WIGb6fRT11CTYcUqSzkxwNCq1_Z/s400/spring-boot-app-run.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;spring-boot app run&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;br /&gt;
10. How to Test a spring application on any web browser?&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt; &lt;/b&gt; Open any Web Browser, type the &lt;b&gt;http://localhost:8080/get-employee&lt;/b&gt;&lt;br /&gt;
It&#39;s recommended the spring REST API testing purposed used the Postman or SOAPUI&amp;nbsp; tools.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDkNQkYUacLi-TRIEnyVzKsjFOH5tfX0to1SRUgnXuKdhJGA6ouGXPLIATnm6KEhyphenhyphen_EnxgtkZFjC47OlMOL_BSR_51C0H7-NM1uAXT5ZklFo0fnZ_WGJ4JFrGjKDouWphGrDAyn9kEAK2J/s1600/spring-boot-app-test-in-browser.JPG&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;347&quot; data-original-width=&quot;1145&quot; height=&quot;192&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDkNQkYUacLi-TRIEnyVzKsjFOH5tfX0to1SRUgnXuKdhJGA6ouGXPLIATnm6KEhyphenhyphen_EnxgtkZFjC47OlMOL_BSR_51C0H7-NM1uAXT5ZklFo0fnZ_WGJ4JFrGjKDouWphGrDAyn9kEAK2J/s640/spring-boot-app-test-in-browser.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
here, &lt;b&gt;localhost&lt;/b&gt; -for development stage or application running on the local system.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
for production/testing/QA stages used the domain name or IP address instead of localhost. for example https://java-scholars.blogspot.in/get-employee&amp;nbsp;or https://www.abc.com/get-employee&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
here, &lt;b&gt;8080&lt;/b&gt; is the default port number of the Apache Tomcat server, if you want to change this port number then go to the &lt;b&gt;application.properties&lt;/b&gt; and write the &lt;b&gt;server.port=8081&lt;/b&gt; or as per your choice&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
here, &lt;b&gt;/get-employee&lt;/b&gt; is requested coming from the server to the controller, request handler check exact matching RequestMapping available or not, if available then sending the response. if Not available throw the&amp;nbsp; 404 exceptions.&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;11. How to create an executable jar/war of the spring boot application? or maven command for jar/ war creation of the spring boot application.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Right-click on a &lt;b&gt;project&lt;/b&gt;, select &lt;b&gt;Run As&lt;/b&gt;&amp;nbsp; and click on a &lt;b&gt;Maven clean&lt;/b&gt;,&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Right-click on a &lt;b&gt;project&lt;/b&gt;, select &lt;b&gt;Run As&lt;/b&gt; and click on a &lt;b&gt;Maven build&lt;/b&gt;, write the &lt;i&gt;goals:&lt;/i&gt; &lt;b&gt;package&lt;/b&gt; and click on &lt;b&gt;Run button&lt;/b&gt;.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;12. How to deploy spring boot application in Apache Tomcat server?&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Created a jar/war location inside the &lt;i&gt;target&lt;/i&gt; folder of your spring boot project.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
When deploying the spring boot application on any server then pass the complete path of the jar/war file. Let&#39;s go to the &lt;i&gt;command prompt&lt;/i&gt; for the deployment of jar/war.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: black; color: white;&quot;&gt;C:\WINDOWS\system32&amp;gt;java -jar V:\target\springbootexample-0.0.1-SNAPSHOT.jar &lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;↚&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Above command applicable for both packaging type(jar/war).&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;13. How to stop the server?&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: black;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;control + c&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: black;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Spring boot related most important topics are-&lt;br /&gt;
&lt;a href=&quot;https://java-scholars.blogspot.com/2019/08/learn-spring-boot-tutorial-with-real.html&quot; rel=&quot;nofollow&quot;&gt;What is spring boot?&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;a href=&quot;https://java-scholars.blogspot.com/2019/08/advantages-of-spring-boot.html&quot; rel=&quot;nofollow&quot;&gt;Advantages of Spring boot&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://java-scholars.blogspot.com/2019/08/learn-spring-boot-tutorial-with-real.html&quot;&gt;Why we used spring boot?&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://java-scholars.blogspot.com/2019/08/top-most-java-logical-programs-list-and.html&quot; rel=&quot;nofollow&quot;&gt;Top java logical programs&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;Click here for download the project&lt;/b&gt;- &lt;a href=&quot;https://drive.google.com/uc?export=download&amp;amp;id=1eJqe18gA16Ure5h3nfFGfavl449xNdSv&quot; rel=&quot;nofollow&quot;&gt;springbootexample.zip&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Click here for download the project&lt;/b&gt;-&lt;a href=&quot;https://drive.google.com/file/d/1eJqe18gA16Ure5h3nfFGfavl449xNdSv/view?usp=sharing&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;&amp;nbsp;spri&lt;span id=&quot;goog_565184313&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_565184314&quot;&gt;&lt;/span&gt;ngbootexample.zip&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://java-scholars.blogspot.com/feeds/5871293200658906028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://java-scholars.blogspot.com/2019/08/spring-boot-example-spring-rest-example.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5448226200237867837/posts/default/5871293200658906028'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5448226200237867837/posts/default/5871293200658906028'/><link rel='alternate' type='text/html' href='https://java-scholars.blogspot.com/2019/08/spring-boot-example-spring-rest-example.html' title='Spring boot Example | Spring REST Example with Spring boot'/><author><name>Narendra Rathod</name><uri>http://www.blogger.com/profile/07520199330527180788</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrxufXPFsszSkULyHqXzJoZtWBsjKov1dVDQ-_-llv61UgzY9s2ySCKYwRsEwhH67sZVSgxXMDwhIo-T62I-LnCPQUQVCLymuvObbrM74xvCX-884UOSgJ2Fa4dV-_FtY9pzgdWsOVp1FL/s72-c/spring-initialzr.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5448226200237867837.post-1772761485480904486</id><published>2019-08-03T15:30:00.001+05:30</published><updated>2019-08-12T17:53:26.377+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="java interview question"/><title type='text'>Java Logical Programs | Java Programming Examples</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Java features and java logical program is commonly asked in every interview room. before you go for an interview must prepare java programming examples. In IT industries,&amp;nbsp; every interviewer checking your logic based on java logical programs and java logical code example.&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;1. Write a java program to find the duplicate vowel and count the duplicate vowel from a given string?&lt;/b&gt;&lt;/h4&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;input = &quot;Scholars-Java Blogspot in&quot;&lt;br /&gt;
&lt;div id=&quot;javaCode&quot;&gt;package in.blogspot.scholars.java;&lt;br /&gt;
&lt;br /&gt;
public class RemoveVowelExample {&lt;br /&gt;
&lt;br /&gt;
public static String removeVowels(String input) {&lt;br /&gt;
&lt;br /&gt;
String novowelString = &quot;&quot;;&lt;br /&gt;
&lt;br /&gt;
String presentVowel = &quot;&quot;;&lt;br /&gt;
&lt;br /&gt;
int vowelCount = 0;&lt;br /&gt;
&lt;br /&gt;
for (int i = 0; i &amp;lt; input.length(); i++) {&lt;br /&gt;
&lt;br /&gt;
// vowel does not present then print&lt;br /&gt;
&lt;br /&gt;
if (!isVowel((input.charAt(i)))) {&lt;br /&gt;
&lt;br /&gt;
novowelString = novowelString + input.charAt(i);&lt;br /&gt;
&lt;br /&gt;
} else {&lt;br /&gt;
&lt;br /&gt;
presentVowel = presentVowel + input.charAt(i);&lt;br /&gt;
&lt;br /&gt;
vowelCount++;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;present vowel = &quot; + presentVowel);&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;COUNT present vowel into the String = &quot; + vowelCount);&lt;br /&gt;
&lt;br /&gt;
return novowelString;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public static boolean isVowel(char c) {&lt;br /&gt;
&lt;br /&gt;
// check input each character from input string&lt;br /&gt;
&lt;br /&gt;
// 5 vowels checking with your each input character String&lt;br /&gt;
&lt;br /&gt;
String vowels = &quot;auioe&quot;;&lt;br /&gt;
&lt;br /&gt;
for (int i = 0; i &amp;lt; 5; i++) {&lt;br /&gt;
&lt;br /&gt;
if (c == vowels.charAt(i))&lt;br /&gt;
&lt;br /&gt;
return true;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
return false;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
// enter input string&lt;br /&gt;
&lt;br /&gt;
String input = &quot;Scholars-Java Blogspot in&quot;;&lt;br /&gt;
&lt;br /&gt;
String removeVowels = removeVowels(input.toLowerCase());&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;final non vowel String = &quot; + removeVowels);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;/div&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
present vowel = oaaaooi
COUNT present vowel into the String = 7
final non vowel String = schlrs-jv blgspt n&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;2. Write a java program to find/check the duplicate character and count the duplicate character from the given string?&lt;/b&gt;&lt;/h4&gt;&lt;div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;input: &quot;javaScholars&quot;&lt;/div&gt;&lt;div id=&quot;javaCode1&quot;&gt;package in.blogspot.scholars.java;&lt;br /&gt;
&lt;br /&gt;
public class duplcateCharacterFromStringExample {&lt;br /&gt;
&lt;br /&gt;
public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
String str = &quot;javaScholars&quot;;&lt;br /&gt;
&lt;br /&gt;
int count = 0;&lt;br /&gt;
&lt;br /&gt;
// store each lower case character into char Arrays&lt;br /&gt;
&lt;br /&gt;
char[] input = str.toLowerCase().toCharArray();&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;Duplicate Characters are = &quot;);&lt;br /&gt;
&lt;br /&gt;
for (int i = 0; i &amp;lt; str.length(); i++) {&lt;br /&gt;
&lt;br /&gt;
for (int j = i + 1; j &amp;lt; str.length(); j++) {&lt;br /&gt;
&lt;br /&gt;
if (input[i] == input[j]) {&lt;br /&gt;
System.out.print(input[j] + &quot; &quot;);&lt;br /&gt;
count++;&lt;br /&gt;
break;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
if (count &amp;gt; 0)&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;\nDuplicate character COUNT from String = &quot; + count);&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;No Duplicate = &quot; + str);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;/div&gt;&lt;div&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/div&gt;&lt;pre&gt;&lt;code&gt;
Duplicate Characters are =
a a s
Duplicate Character COUNT from String= 3
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;h4&gt;&lt;b&gt;3. Write a java program to check/find the given string anagram or not?&lt;/b&gt;&lt;/h4&gt;&lt;/div&gt;&lt;div&gt;input = &quot;javaS&quot;;&lt;br /&gt;
input2 = &quot;Vjasa &quot;;&lt;br /&gt;
&lt;div id=&quot;javaCode2&quot;&gt;package in.blogspot.scholars.java;&lt;br /&gt;
&lt;br /&gt;
import java.util.Arrays;&lt;br /&gt;
&lt;br /&gt;
public class AnagramOrNotExample {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// If the same length of both an exact match each character to each other&lt;br /&gt;
&lt;br /&gt;
// is known as Anagram&lt;br /&gt;
&lt;br /&gt;
// 1. madam or mmaad or madma&lt;br /&gt;
&lt;br /&gt;
String input = &quot;javaS&quot;;&lt;br /&gt;
&lt;br /&gt;
String input2 = &quot;Vjasa &quot;;&lt;br /&gt;
&lt;br /&gt;
// remove space may contain&lt;br /&gt;
&lt;br /&gt;
String str1 = input.replaceAll(&quot;\\s&quot;, &quot;&quot;);&lt;br /&gt;
&lt;br /&gt;
String str2 = input2.replaceAll(&quot;\\s&quot;, &quot;&quot;);&lt;br /&gt;
&lt;br /&gt;
// check&lt;br /&gt;
&lt;br /&gt;
boolean status = true;&lt;br /&gt;
&lt;br /&gt;
// check length equal or not&lt;br /&gt;
&lt;br /&gt;
if (str1.length() != str2.length()) {&lt;br /&gt;
&lt;br /&gt;
status = false;&lt;br /&gt;
&lt;br /&gt;
} else {&lt;br /&gt;
&lt;br /&gt;
// make lower case both&lt;br /&gt;
&lt;br /&gt;
// convert string in each character and add into arrays&lt;br /&gt;
&lt;br /&gt;
char[] ch = str1.toLowerCase().toCharArray();&lt;br /&gt;
&lt;br /&gt;
char[] ch2 = str2.toLowerCase().toCharArray();&lt;br /&gt;
&lt;br /&gt;
// sort ascending order&lt;br /&gt;
&lt;br /&gt;
Arrays.sort(ch);&lt;br /&gt;
&lt;br /&gt;
Arrays.sort(ch2);&lt;br /&gt;
&lt;br /&gt;
// check string one of each character to another String of each&lt;br /&gt;
&lt;br /&gt;
status = Arrays.equals(ch, ch2);&lt;br /&gt;
&lt;br /&gt;
// if true&lt;br /&gt;
&lt;br /&gt;
if (status) {&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;is anagram : &quot; + input + &quot;==&quot; + input2);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// if false&lt;br /&gt;
&lt;br /&gt;
if (status == false) {&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;is NOT anagram : &quot; + input + &quot;==&quot; + input2);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/div&gt;&lt;pre&gt;&lt;code&gt;is anagram : javaS==&lt;/code&gt;Vjasa&lt;/pre&gt;&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;4. Write a java program to find/check given mobile number fancy number or not?&lt;/b&gt;&lt;/h4&gt;&lt;div&gt;input =&amp;nbsp;&quot;9788865456&quot;&lt;br /&gt;
&lt;div id=&quot;javaCode3&quot;&gt;package in.blogspot.scholars.java;&lt;br /&gt;
&lt;br /&gt;
public class FancyNumberExample {&lt;br /&gt;
&lt;br /&gt;
public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
// 1. 987/321&lt;br /&gt;
&lt;br /&gt;
// 2. 123/789&lt;br /&gt;
&lt;br /&gt;
// 3. 111/999&lt;br /&gt;
&lt;br /&gt;
String input = &quot;9788865456&quot;;&lt;br /&gt;
&lt;br /&gt;
int[] arr = new int[input.length()];&lt;br /&gt;
&lt;br /&gt;
for (int i = 0; i &amp;lt; input.length(); i++) {&lt;br /&gt;
// string to char and char to int arrays&lt;br /&gt;
arr[i] = Character.getNumericValue((input.charAt(i)));&lt;br /&gt;
}&lt;br /&gt;
int count = 1;&lt;br /&gt;
for (int i = 0; i &amp;lt; arr.length - 1; i++)&lt;br /&gt;
{&lt;br /&gt;
// consecutive equal no, ascending order sequence sequence, descending sequence&lt;br /&gt;
if (arr[i + 1] == arr[i] || arr[i + 1] - arr[i] == 1 || arr[i] - arr[i + 1] == 1)&lt;br /&gt;
{&lt;br /&gt;
count++;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
// If more than two continue the same number then fancy no. otherwise NOT&lt;br /&gt;
if (count &amp;gt; 2)&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;count = &quot; + count + &quot; Number is fancy ::&quot; + input);&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;count= &quot; + count + &quot; Number is NOT fancy ::&quot; + input);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
}&lt;/div&gt;&lt;div&gt;&lt;b&gt;Output:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;pre&gt;&lt;code&gt;
count = 8 Number is fancy ::9788865456
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;5. Write a java program to swap two numbers without using 3 variables?&lt;/b&gt;&lt;/h4&gt;input value1 = 20&lt;br /&gt;
input value2 = 10&lt;br /&gt;
&lt;div id=&quot;javaCode4&quot;&gt;package in.blogspot.scholars.java;&lt;br /&gt;
&lt;br /&gt;
public class SwapTwoNumberExample {&lt;br /&gt;
&lt;br /&gt;
public void swapTwoVariable() {&lt;br /&gt;
// test cases&lt;br /&gt;
// 1. value1 = 20, value2 = 20&lt;br /&gt;
// 2. value1 = 10, value2 = 20&lt;br /&gt;
// 3. value1 = 20, value2 = 10&lt;br /&gt;
&lt;br /&gt;
int value1 = 20, value2 = 10;&lt;br /&gt;
System.out.println(&quot; value1 &quot; + value1 + &quot;\n value2 &quot; + value2);&lt;br /&gt;
if (value2 == value1) {&lt;br /&gt;
System.out.println(&quot; Not required to SWAP&quot;);&lt;br /&gt;
}&lt;br /&gt;
if (value2 &amp;gt; value1) {&lt;br /&gt;
value1 = value1 + value2;&lt;br /&gt;
&lt;br /&gt;
value2 = value1 - value2;&lt;br /&gt;
value1 = value1 - value2;&lt;br /&gt;
System.out.println(&quot; SWAP IS : \n value1 &quot; + value1 + &quot;\n value2 &quot; + value2);&lt;br /&gt;
}&lt;br /&gt;
if (value2 &amp;lt; value1)&lt;br /&gt;
{&lt;br /&gt;
{&lt;br /&gt;
value2 = value1 + value2;&lt;br /&gt;
value1 = value2 - value1;&lt;br /&gt;
value2 = value2 - value1;&lt;br /&gt;
System.out.println(&quot; SWAP IS :\n value1 &quot; + value1 + &quot;\n value2 &quot; + value2);&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
public static void main(String[] args)&lt;br /&gt;
{&lt;br /&gt;
// TODO Auto-generated method stub&lt;br /&gt;
SwapTwoNumberExample calling = new SwapTwoNumberExample();&lt;br /&gt;
calling.swapTwoVariable();&lt;br /&gt;
}&lt;br /&gt;
}&lt;/div&gt;&lt;div&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/div&gt;&lt;pre&gt;&lt;code&gt;
value1 20
value2 10
SWAP IS :
value1 10
value2 20
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h4&gt;&lt;b&gt;6. Write a java program to reverse number?&lt;/b&gt;&lt;/h4&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;input = 4537&lt;/div&gt;&lt;div id=&quot;javaCode5&quot;&gt;package in.blogspot.scholars.java;&lt;br /&gt;
&lt;br /&gt;
public class ReverseStringNumberExample {&lt;br /&gt;
&lt;br /&gt;
public void numberReverse(int num) {&lt;br /&gt;
&lt;br /&gt;
int reverse = 0;&lt;br /&gt;
&lt;br /&gt;
while (num != 0) {&lt;br /&gt;
&lt;br /&gt;
reverse = reverse * 10;&lt;br /&gt;
&lt;br /&gt;
reverse = reverse + num % 10;&lt;br /&gt;
&lt;br /&gt;
// System.out.println(reverse);&lt;br /&gt;
&lt;br /&gt;
num = num / 10;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;Reverse number = &quot; + reverse);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
// TODO Auto-generated method stub&lt;br /&gt;
&lt;br /&gt;
ReverseStringNumberExample revStr = new ReverseStringNumberExample();&lt;br /&gt;
&lt;br /&gt;
//input number&lt;br /&gt;
&lt;br /&gt;
revStr.numberReverse(4537);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;/div&gt;&lt;div&gt;&lt;b&gt;Output:&lt;/b&gt;&amp;nbsp;&lt;/div&gt;&lt;pre&gt;&lt;code&gt;
Reverse number = 7354
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;7. Write a java program to reverse a string without using the reverse () method?&lt;/b&gt;&lt;/h4&gt;input = &quot;Java Scholars&quot;;&lt;br /&gt;
&lt;div id=&quot;javaCode6&quot;&gt;package in.blogspot.scholars.java;&lt;br /&gt;
&lt;br /&gt;
public class ReverseStringNumberExample {&lt;br /&gt;
&lt;br /&gt;
// Reverse String&lt;br /&gt;
&lt;br /&gt;
public void stringreverse() {&lt;br /&gt;
&lt;br /&gt;
String str = &quot;Java Scholars&quot;;&lt;br /&gt;
&lt;br /&gt;
String s = &quot;&quot;;&lt;br /&gt;
&lt;br /&gt;
//int i;&lt;br /&gt;
&lt;br /&gt;
int length = str.length();&lt;br /&gt;
&lt;br /&gt;
for (i = length - 1; i &amp;gt;= 0; i--) {&lt;br /&gt;
&lt;br /&gt;
s = s + str.charAt(i);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;reverse string = &quot; + s);&lt;br /&gt;
&lt;br /&gt;
System.out.println();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
// TODO Auto-generated method stub&lt;br /&gt;
&lt;br /&gt;
ReverseStringNumberExample revStr = new ReverseStringNumberExample();&lt;br /&gt;
&lt;br /&gt;
revStr.stringreverse();&lt;br /&gt;
}&lt;br /&gt;
}&lt;/div&gt;&lt;div&gt;&lt;b&gt;Output:&lt;/b&gt;&amp;nbsp;&lt;/div&gt;&lt;pre style=&quot;text-align: left;&quot;&gt;&lt;code&gt;
reverse string = sralohcS ava
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;8. Write a java program to print pyramid pattern of stars?&lt;/b&gt;&lt;/h4&gt;&lt;div style=&quot;text-align: left;&quot;&gt;row input: 5&lt;br /&gt;
&lt;div id=&quot;javaCode7&quot;&gt;package in.blogspot.scholars.java;&lt;br /&gt;
&lt;br /&gt;
import java.io.IOException;&lt;br /&gt;
&lt;br /&gt;
public class StarTringleExample {&lt;br /&gt;
&lt;br /&gt;
public static void printtriangle(int rows) {&lt;br /&gt;
&lt;br /&gt;
// spaces&lt;br /&gt;
&lt;br /&gt;
int s = 2 * rows - 2;&lt;br /&gt;
&lt;br /&gt;
// outer loop to handle the number of rows&lt;br /&gt;
&lt;br /&gt;
// rows in this case&lt;br /&gt;
&lt;br /&gt;
for (int i = 0; i &amp;lt; rows; i++)&lt;br /&gt;
{&lt;br /&gt;
// inner loop to handle number spaces&lt;br /&gt;
// values changing according to the requirement&lt;br /&gt;
for (int j = 0; j &amp;lt; s; j++)&lt;br /&gt;
{&lt;br /&gt;
// print spaces&lt;br /&gt;
System.out.print(&quot; &quot;);&lt;br /&gt;
}&lt;br /&gt;
// Decrementing space after each loop&lt;br /&gt;
s = s - 1;&lt;br /&gt;
// inner loop to handle the number of columns&lt;br /&gt;
&lt;br /&gt;
// values changing according to the outer loop&lt;br /&gt;
for (int j = 0; j &amp;lt;= i; j++)&lt;br /&gt;
{&lt;br /&gt;
// print stars&lt;br /&gt;
System.out.print(&quot;*&quot; + &quot; &quot;);&lt;br /&gt;
}&lt;br /&gt;
// new line for each row&lt;br /&gt;
System.out.println();&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
public static void main(String[] args) throws Exception&lt;br /&gt;
{&lt;br /&gt;
/ / input rows&lt;br /&gt;
printtriangle(5);&lt;br /&gt;
}&lt;br /&gt;
}&lt;/div&gt;&lt;div&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/div&gt;&lt;pre&gt;&lt;code&gt;
        *       
       * *
      * * *
     * * * *
    * * * * *
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;9. Write a java program to the print stars pattern and print the number patterns in reverse order?&lt;/b&gt;&lt;/h4&gt;input row = 5&lt;br /&gt;
&lt;div id=&quot;javaCode8&quot;&gt;package in.blogspot.scholars.java;&lt;br /&gt;
&lt;br /&gt;
import java.io.IOException;&lt;br /&gt;
&lt;br /&gt;
public class StarTringleExample {&lt;br /&gt;
&lt;br /&gt;
public static void starsreversenum(int rows) throws NumberFormatException, IOException {&lt;br /&gt;
&lt;br /&gt;
int i, j, a = 1;&lt;br /&gt;
&lt;br /&gt;
for (i = 1; i = rows; i++)&lt;br /&gt;
{&lt;br /&gt;
a = ((i * (i + 1)) + 1) / 2;&lt;br /&gt;
for (j = 1; j = i; j++)&lt;br /&gt;
{&lt;br /&gt;
System.out.print((a--) + &quot;*&quot;);&lt;br /&gt;
}&lt;br /&gt;
System.out.println();&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
public static void main(String[] args) throws Exception {&lt;br /&gt;
// rows input&lt;br /&gt;
StarTringleExample.starsreversenum(5);&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;/div&gt;&lt;div&gt;&lt;b&gt;Output: &lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;pre&gt;&lt;code&gt; 
1*  
3*2*  
6*5*4*  
10*9*8*7*  
15*14*13*12*11*&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;10. Write a java program to check the given number Palindrome&amp;nbsp;number or not? or&amp;nbsp;palindrome example in java?&lt;/h4&gt;&lt;span style=&quot;background-color: white;&quot;&gt;input = 23432&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;output = 23432&lt;/span&gt;&lt;br /&gt;
&lt;div id=&quot;javaCode9&quot;&gt;package in.blogspot.scholars.java;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class PolindromeNumberStringExample {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public void polindromeNum(int num) {&lt;br /&gt;
&lt;br /&gt;
int temp, check = 0, remain;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
temp = num;&lt;br /&gt;
&lt;br /&gt;
if (num == 0)&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;please enter the number bigger than zero&quot;);&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
while (num &amp;gt; 0) {&lt;br /&gt;
&lt;br /&gt;
remain = num % 10;&lt;br /&gt;
&lt;br /&gt;
// System.out.println(&quot;remain &quot; + remain);&lt;br /&gt;
&lt;br /&gt;
check = check * 10 + remain;&lt;br /&gt;
&lt;br /&gt;
// System.out.println(&quot;check &quot; + check);&lt;br /&gt;
&lt;br /&gt;
num = num / 10;&lt;br /&gt;
&lt;br /&gt;
// System.out.println(&quot;num &quot; + num);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
System.out.println(check);&lt;br /&gt;
&lt;br /&gt;
if (check == temp) {&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;Given number &quot; + temp + &quot; is Palindrome&quot;);&lt;br /&gt;
&lt;br /&gt;
} else {&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;Given number &quot; + temp + &quot; is Not Palindrome&quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
// TODO Auto-generated method stub&lt;br /&gt;
&lt;br /&gt;
PolindromeNumberStringExample calling = new PolindromeNumberStringExample();&lt;br /&gt;
&lt;br /&gt;
// input number&lt;br /&gt;
&lt;br /&gt;
calling.polindromeNum(23432);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;/div&gt;&lt;div&gt;&lt;b&gt;Output:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;pre&gt;&lt;code&gt;
&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;Given number 23432&amp;nbsp;is Palindrome&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;11. Write a java program to check the given String Palindrome or not? or&amp;nbsp;palindrome string example in java?&lt;/b&gt;&lt;/h4&gt;&lt;div&gt;input = &quot;Nitin&quot;&lt;/div&gt;&lt;div id=&quot;javaCode10&quot;&gt;package in.blogspot.scholars.java;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class PolindromeNumberStringExample {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public void polindromeString(String input) {&lt;br /&gt;
&lt;br /&gt;
String str = &quot;&quot;;&lt;br /&gt;
&lt;br /&gt;
int len = input.length();&lt;br /&gt;
&lt;br /&gt;
if ((input == null) &amp;amp;&amp;amp; (input.equals(&quot;&quot;)))&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;please enter the String value&quot;);&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
for (int i = len - 1; i &amp;gt;= 0; i--) {&lt;br /&gt;
&lt;br /&gt;
str = str + input.charAt(i);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if (input.equalsIgnoreCase(str)) {&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;The string is palindrome =&quot; + input);&lt;br /&gt;
&lt;br /&gt;
} else {&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;The string is not palindrome.&quot; + input);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
// TODO Auto-generated method stub&lt;br /&gt;
&lt;br /&gt;
PolindromeNumberStringExample calling = new PolindromeNumberStringExample();&lt;br /&gt;
&lt;br /&gt;
// input string&lt;br /&gt;
&lt;br /&gt;
calling.polindromeString(&quot;Nitin&quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;/div&gt;&lt;div&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;&lt;code&gt;
&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;The string is palindrome =Nitin&lt;/span&gt;&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;12. Write a java program to find the duplicate number element and duplicate number element count from Array?&lt;/h4&gt;&lt;span style=&quot;background-color: white;&quot;&gt;input:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;int[] arr =&lt;/span&gt;{ 4, 2, 4, 5, 2, 3, 1, 1 }&lt;br /&gt;
&lt;div id=&quot;javaCode11&quot;&gt;package in.blogspot.scholars.java;&lt;br /&gt;
&lt;br /&gt;
public class DuplicateElementFromArrayExample {&lt;br /&gt;
&lt;br /&gt;
public static void duplicateCount(int arr_size, int[] arr) {&lt;br /&gt;
&lt;br /&gt;
int i, j;&lt;br /&gt;
&lt;br /&gt;
int count = 0;&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;Repeated/Duplicate Integer elements are :&quot;);&lt;br /&gt;
&lt;br /&gt;
for (i = 0; i &amp;lt; arr_size; i++)&lt;br /&gt;
{&lt;br /&gt;
for (j = i + 1; j &amp;lt; arr_size; j++)&lt;br /&gt;
{&lt;br /&gt;
if (arr[i] == arr[j])&lt;br /&gt;
{&lt;br /&gt;
count++;       &lt;br /&gt;
System.out.print(arr[j] + &quot; &quot;);&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
System.out.println(&quot;\n No. of duplicates Integer element COUNT :&quot; + count);&lt;br /&gt;
}&lt;br /&gt;
public static void main(String[] args)&lt;br /&gt;
{&lt;br /&gt;
int arr[] = { 4, 2, 4, 5, 2, 3, 1, 1 };&lt;br /&gt;
int arr_size = arr.length;&lt;br /&gt;
duplicateCount(arr_size, arr);&lt;br /&gt;
}&lt;br /&gt;
}&lt;/div&gt;&lt;div&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/div&gt;&lt;pre&gt;&lt;code&gt;
Repeated/Duplicate Integer elements are :
4 2 1
No. of duplicates Integer element COUNT :3&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;13. Write a java program to find the duplicate string element and duplicate string element count from Array?&lt;/h4&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;input:&lt;b style=&quot;font-weight: 400;&quot;&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
String[] str = { &quot;abc&quot;, &quot;adc&quot;, &quot;aMc&quot;, &quot;aec&quot;, &quot;adc&quot;, &quot;abc&quot; }&lt;/div&gt;&lt;div id=&quot;javaCode12&quot;&gt;package in.blogspot.scholars.java;&lt;br /&gt;
&lt;br /&gt;
public class DuplicateElementFromArrayExample {&lt;br /&gt;
&lt;br /&gt;
public static void strCount(int Str_len, String[] str) {&lt;br /&gt;
&lt;br /&gt;
int i, j;&lt;br /&gt;
&lt;br /&gt;
int count = 0;&lt;br /&gt;
&lt;br /&gt;
System.out.println(&quot;Repeated/Duplicate  String elements are :&quot;);&lt;br /&gt;
&lt;br /&gt;
for (i = 0; i &amp;lt; Str_len; i++)&lt;br /&gt;
{&lt;br /&gt;
for (j = i + 1; j &amp;lt; Str_len; j++)&lt;br /&gt;
{&lt;br /&gt;
if (str[i] == str[j])&lt;br /&gt;
{&lt;br /&gt;
count++;       &lt;br /&gt;
System.out.print(str[i] + &quot; &quot;);&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
System.out.println(&quot;\n No. of duplicates String element COUNT :&quot; + count);&lt;br /&gt;
}&lt;br /&gt;
public static void main(String[] args)&lt;br /&gt;
{&lt;br /&gt;
String[] str = { &quot;abc&quot;, &quot;adc&quot;, &quot;aMc&quot;, &quot;aec&quot;, &quot;adc&quot;, &quot;abc&quot; };&lt;br /&gt;
int Str_len = str.length;&lt;br /&gt;
strCount(Str_len, str);&lt;br /&gt;
}&lt;br /&gt;
}&lt;/div&gt;&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;&lt;code&gt;
Repeated/Duplicate String elements are :
abc adc
No. of duplicates String element COUNT :2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;14. Write a java program to find the prime number? or prime number example in java?&lt;/h4&gt;&lt;div style=&quot;margin: 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;input: 4&lt;/span&gt;&lt;/div&gt;&lt;div id=&quot;javaCode13&quot;&gt;package in.blogspot.scholars.java;&lt;br /&gt;
&lt;br /&gt;
public class PrimeNoExample {&lt;br /&gt;
&lt;br /&gt;
public static void main(String[] args) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// prime no greater than 1 and divisible by itself&lt;br /&gt;
&lt;br /&gt;
int inputnum = 4, flag = 0;&lt;br /&gt;
&lt;br /&gt;
int m = inputnum / 2;&lt;br /&gt;
&lt;br /&gt;
if (inputnum == 0 ||inputnum == 1) {&lt;br /&gt;
&lt;br /&gt;
System.out.println(inputnum + &quot;= not prime no.&quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
} else {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
for (int i = 2; i &amp;lt;= m; i++)&lt;br /&gt;
{&lt;br /&gt;
if (inputnum % i == 0)&lt;br /&gt;
{&lt;br /&gt;
System.out.println(inputnum + &quot;= not prime no.&quot;);&lt;br /&gt;
flag = 1;&lt;br /&gt;
break;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
if (flag == 0)&lt;br /&gt;
{&lt;br /&gt;
System.out.println(inputnum + &quot; is prime no.&quot;);&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;/div&gt;&lt;div style=&quot;font-weight: bold;&quot;&gt;Output:&lt;/div&gt;&lt;pre&gt;&lt;code&gt;
4 is not prime no.
&lt;/code&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white;&quot;&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;15. Fibonacci&amp;nbsp;Series in java? or Fibbonaci series example in java?&lt;/h4&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white;&quot;&gt;input : 10&lt;/div&gt;&lt;div id=&quot;javaCode14&quot;&gt;package in.blogspot.scholars.java;&lt;br /&gt;
&lt;br /&gt;
public class FibbonaciSeriesExamplescalling {&lt;br /&gt;
&lt;br /&gt;
public void fibonacci() {&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
* series of numbers in which each number ( Fibonacci number ) is the sum of the&lt;br /&gt;
* two preceding numbers.&lt;br /&gt;
* &lt;br /&gt;
* &lt;br /&gt;
* &lt;br /&gt;
* The simplest is the series 1, 1, 2, 3, 5, 8, etc&lt;br /&gt;
* &lt;br /&gt;
* &lt;br /&gt;
* &lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
int input = 10, s1 = 0, s2 = 1, s3 = 0;&lt;br /&gt;
&lt;br /&gt;
System.out.print(s1 + &quot;,&quot; + s2);&lt;br /&gt;
&lt;br /&gt;
for (int i = 0; i &amp;lt; input; i++)&lt;br /&gt;
{     &lt;br /&gt;
s3 = s1 + s2;&lt;br /&gt;
System.out.print(&quot;,&quot; + s3);&lt;br /&gt;
s1 = s2;    &lt;br /&gt;
s2 = s3;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
public static void main(String[] args)&lt;br /&gt;
{&lt;br /&gt;
// TODO Auto-generated method stub&lt;br /&gt;
FibbonaciSeriesExamplescalling = new FibbonaciSeriesExample();&lt;br /&gt;
calling.fibonacci();&lt;br /&gt;
}&lt;br /&gt;
}&lt;/div&gt;&lt;div&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/div&gt;&lt;pre&gt;&lt;code&gt;
0,1,1,2,3,5,8,13,21,34,55,89
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://java-scholars.blogspot.com/feeds/1772761485480904486/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://java-scholars.blogspot.com/2019/08/top-most-java-logical-programs-list-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5448226200237867837/posts/default/1772761485480904486'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5448226200237867837/posts/default/1772761485480904486'/><link rel='alternate' type='text/html' href='https://java-scholars.blogspot.com/2019/08/top-most-java-logical-programs-list-and.html' title='Java Logical Programs | Java Programming Examples'/><author><name>Narendra Rathod</name><uri>http://www.blogger.com/profile/07520199330527180788</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5448226200237867837.post-512024266878723345</id><published>2019-08-02T14:43:00.000+05:30</published><updated>2019-08-17T00:26:45.417+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="spring boot"/><title type='text'>Learn Spring boot tutorial | Spring boot Introduction</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBpEVuH96FozQWvl1iUMiooZPTogvwbJMLYZxAEIHbNOw9NKxLGWZRRG_xlBCoVjiFgwOBbVt5eVuYKWd87gjY_TqxAocR5LFjr7bGrAw0DgG51FhW46rtwH6tbuRX4qHO9r9ItYfxTdyz/s1600/spring-boot-image.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;spring boot, spring boot tutorials&quot; border=&quot;0&quot; data-original-height=&quot;257&quot; data-original-width=&quot;490&quot; height=&quot;104&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBpEVuH96FozQWvl1iUMiooZPTogvwbJMLYZxAEIHbNOw9NKxLGWZRRG_xlBCoVjiFgwOBbVt5eVuYKWd87gjY_TqxAocR5LFjr7bGrAw0DgG51FhW46rtwH6tbuRX4qHO9r9ItYfxTdyz/s200/spring-boot-image.png&quot; title=&quot;Spring boot&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;In spring boot tutorial, provides the details of the spring boot introduction, advantages of spring boot, spring boot examples, spring boot dependency and spring MVC application using spring boot example.&lt;/div&gt;
&lt;h3 style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: #990000;&quot;&gt;&lt;a href=&quot;https://java-scholars.blogspot.com/2019/08/learn-spring-boot-tutorial-with-real.html&quot; rel=&quot;nofollow&quot;&gt;&lt;span id=&quot;goog_1987721386&quot;&gt;&lt;/span&gt;Spring boot Introduction&lt;/a&gt;&lt;span id=&quot;goog_1987721387&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Spring-boot is a&amp;nbsp; module of spring framework provided by&amp;nbsp;&lt;a href=&quot;https://spring.io/&quot; rel=&quot;nofollow&quot;&gt;spring.io&lt;/a&gt;&amp;nbsp;&lt;span id=&quot;goog_1789584879&quot;&gt;&lt;/span&gt;&lt;a href=&quot;https://www.blogger.com/&quot;&gt;&lt;/a&gt;&lt;span id=&quot;goog_1789584880&quot;&gt;&lt;/span&gt;guys. Basically, spring boot is an open-source Java framework used to create the spring applications and microservices Spring-boot provides the core to the advanced concept to developed spring environment applications and projects.&amp;nbsp; Spring-boot&amp;nbsp; &quot;just run&quot; the spring web-based application as a standalone application.&lt;br /&gt;
&lt;div&gt;
&lt;h3 style=&quot;text-align: center;&quot;&gt;
Why We Used Spring boot?&lt;/h3&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;When we create a spring MVC application without spring boot&lt;/b&gt;, in that No. of configuration metadata files, setup the server, create folder structure/project architecture, if small changes needed then required the un-deployments and deployments, data access configuration, etc.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;When we create spring MVC application with spring boot&lt;/b&gt;, that minimizes the development time and maintenance, eliminating the lots of configuration files and server setup with the help of the application.properties, No need for deployment and redeployment using Devtools, etc&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3 style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://java-scholars.blogspot.com/2019/08/advantages-of-spring-boot.html&quot; rel=&quot;nofollow&quot;&gt;Advantages of Spring boot&lt;/a&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;No need to set up the server, spring boot contains inbuilt apache tomcat and jetty servers.&lt;/li&gt;
&lt;li&gt;Just run your web-based spring application as a standalone or java application.&lt;/li&gt;
&lt;li&gt;It provides the inbuilt derby database to perform the data access layer.&lt;/li&gt;
&lt;li&gt;It minimizes the lots of setup and configuration files with the help of an application. properties&lt;/li&gt;
&lt;li&gt;We can easily implement microservices using spring boot.&lt;/li&gt;
&lt;li&gt;It reduced the code size, development times, maintenance of application and increased code reusability.&lt;/li&gt;
&lt;li&gt;Spring boot Actuator dependency, it is a tool to manage the production environment HTTP endpoint.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Spring boot Devtools dependency, its help and eliminate the deployment process on the server. (Changes any code then no need to undeployment and deployment).&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
Spring boot related most important topics are-&lt;br /&gt;
&lt;a href=&quot;https://java-scholars.blogspot.com/2019/08/spring-boot-example-spring-rest-example.html&quot; rel=&quot;nofollow&quot;&gt;Spring boot example | Spring REST Example Using Spring boot&lt;/a&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;a href=&quot;https://java-scholars.blogspot.com/2019/08/top-most-java-logical-programs-list-and.html&quot; rel=&quot;nofollow&quot;&gt;Top java logical programs&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://java-scholars.blogspot.com/feeds/512024266878723345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://java-scholars.blogspot.com/2019/08/learn-spring-boot-tutorial-with-real.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5448226200237867837/posts/default/512024266878723345'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5448226200237867837/posts/default/512024266878723345'/><link rel='alternate' type='text/html' href='https://java-scholars.blogspot.com/2019/08/learn-spring-boot-tutorial-with-real.html' title='Learn Spring boot tutorial | Spring boot Introduction'/><author><name>Narendra Rathod</name><uri>http://www.blogger.com/profile/07520199330527180788</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBpEVuH96FozQWvl1iUMiooZPTogvwbJMLYZxAEIHbNOw9NKxLGWZRRG_xlBCoVjiFgwOBbVt5eVuYKWd87gjY_TqxAocR5LFjr7bGrAw0DgG51FhW46rtwH6tbuRX4qHO9r9ItYfxTdyz/s72-c/spring-boot-image.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>India</georss:featurename><georss:point>20.593684 78.962880000000041</georss:point><georss:box>-8.6041045000000018 37.654286000000042 49.7914725 120.27147400000004</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5448226200237867837.post-5248155374583963047</id><published>2019-08-01T17:44:00.000+05:30</published><updated>2019-08-12T17:45:28.569+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="spring boot"/><title type='text'>Advantages of Spring boot</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;No need to set up the server, spring boot contains inbuilt apache tomcat and jetty servers.&lt;/li&gt;
&lt;li&gt;Just run your web-based spring application as a standalone or java application.&lt;/li&gt;
&lt;li&gt;It provides the inbuilt derby database to perform the data access layer.&lt;/li&gt;
&lt;li&gt;It minimizes the lots of setup and configuration files with the help of an application. properties&lt;/li&gt;
&lt;li&gt;We can easily implement microservices using spring boot.&lt;/li&gt;
&lt;li&gt;It reduced the code size, development times, maintenance of application and increased code reusability.&lt;/li&gt;
&lt;li&gt;Spring boot Actuator dependency, it is a tool to manage the production environment HTTP endpoint.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Spring boot Devtools dependency, its help and eliminate the deployment process on the server. (Changes any code then no need to undeployment and deployment).&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;a href=&quot;https://java-scholars.blogspot.com/2019/08/learn-spring-boot-tutorial-with-real.html&quot; rel=&quot;nofollow&quot;&gt;Why we used spring boot?&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt; &lt;i&gt;We will analyze all the advantages of the spring boot with the help of spring boot example in the next chapter.&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://java-scholars.blogspot.com/feeds/5248155374583963047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://java-scholars.blogspot.com/2019/08/advantages-of-spring-boot.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5448226200237867837/posts/default/5248155374583963047'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5448226200237867837/posts/default/5248155374583963047'/><link rel='alternate' type='text/html' href='https://java-scholars.blogspot.com/2019/08/advantages-of-spring-boot.html' title='Advantages of Spring boot'/><author><name>Narendra Rathod</name><uri>http://www.blogger.com/profile/07520199330527180788</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>