- Java interview questions on this keyword
- Instance variable in java
- Benefits of arraylist in java over arrays
- Instance variables in java with example program
- Can we define Functional interface with multiple methods in java 8
- Java 8 java.util.function.Function with example program
- What are the advantages and disadvantages of Hibernate over JDBC
- Math.round method() in java
- jstl if else string comparison
- Advantages and disadvantages of arrays in java
- Top 100 Java practice programs with solutions
- How to check if first character of a string is a number or not in java
- How to format text using printf() method in java
- Java program to Convert arraylist to array
- Static method vs final static method in java
- Finalize() method in java with example program
- Format text using printf() method in java
- How to get java source files from jar file
- Quicksort algorithm in java with example program
- 8 different ways to convert int to String in java
- How to run jsp program in eclipse using tomcat
- Exception handling in method overriding
- Java interface programming questions
- Java enum constructor
- jstl if else string comparison
- Java programming interview questions and answers for experienced
- Super keyword java programs for interview for freshers and experienced
- Validate email using javascript
- Super keyword in java inheritance
- Java programming interview questions on this keyword part 1
- Java programming interview questions on this keyword part 2
- Servlets interview questions
- Java XML parsing using DOM Parser
- toString() method in java with example program
- Collection vs Collections
- Dynamic polymorphism in Java
- Default constructor vs no arg constructor
- 3 different ways to print exception message in java
- Method overloading interview questions
- Get table cell data using JavaScript
- Can we have try without catch block in java
- Unreachable Blocks in java
- Enum in java
- Custom iterator in java
- Explain Hibernate Configuration file
- Java interview questions on exception handling
- Is it possible to print message without using System.out.println()
- Java program to restrict a class from creating not more than three objects
- Abstract class and abstract method interview questions and programs
- Interfaces allows constructors?
- Interview Programs and questions on method overriding in java
- Java interview questions on interfaces
- Can we create private constructor in java
- Super keyword interview questions java
- How to check internet connection using java
- Remove duplicates from arraylist without using collections
- What is encapsulation in java ?
- Java interview questions on final keyword
- What is constructor chaining in java?
- Can we create static constructor in java
- Explain java data types with example programs
- Inheritance programming interview questions
- Explain System.out.println()?
- What happens When System.out.println(null)?
- What is non static block in java
- Top 20 collection framework interview questions
- Explain about Enhanced for loop in java
- What are the oops concepts in java?
- Return statement in try catch block java
- What is class and Object in java?
- Can we Overload static methods in java
- Can we Override static methods in java
- Java interview Questions on main() method
- Can we call super class static methods from sub class
- Can you define an abstract class without any abstract methods?
- what are the differences between Final , finally finalize()?
- What is Exception? difference between Exception and Error? and types of Exceptions?
- Differences between method overloading and method overriding
- How to write custom Exception?
- What is serialization?
- What is abstract class and interfaces ?
- How to call garbage collector explicitly?
- what is cloning? difference between shallow copy/shallow cloning and deep copy /deep cloning?
- Difference between arraylist and vector?
- Producer Consumer Problem
- Different ways to create objects in java
- Different places to define object in java
- Why Java does not supports multiple inheritance?
- Difference between enumeration and iterator and list iterator?
- Difference between throw and throws in java
- What is the difference between equals() method and == operator
- Differences between HashMap and Hash-table
- Convert string to date in java
- Remove duplicate elements from an array
- Can we create Thread without extending thread and Implementing Runnable
- Comparable vs Comparator
- Singleton Design Pattern
- Why StringBuffer Class not overriding Equals() method?
- Draw the Architecture Diagram of your current project.
Read Also:
1. Top 15 Garbage Collection Interview Questions
2. Top 10 Oops Concepts Interview Questions
3. Top 15 Java Interview Questions on Constructors
4. Top 10 Inheritance Interview Questions
5. Interview Programs on Strings
6. 10 Interesting Core Java Interview Coding Questions and Answers
7. Top 20 Basic Java Interview Questions for Frehsers
8. Top 10 interview Question on Static keyword.
9.Top 20 Java interview Questions on Increment and Decrement operators
10.Top 10 Interview Questions on main() method
11. Top 12 Java Experienced interview Programming Questions on Strings
12.Pattern Programs in java Part-1
13.Pattern Programs in java Part-2
14.Pattern Programs in java Part-3
Java interview questions for 3 years experienced
1.What is advantage of using spring boot over spring?
2.If I run spring boot as a java application will it run?
3.Can you include other application servers like jboss in spring boot
4.You have spring boot controller in mvc.How to make each request in controller thread safe?
5.Can i use @service annotation in the place of @controller?
no
6.I have Parent table and a child table in database(one to many relationship) How do i update only child table without using parent table?
7.Can spring data jpa work without ORM provider?
Note: All are expecting microservices with spring boot.So better get some hands on with microservices before attending interview.All the best!!
1) What is @Transactional annotation?
2) What is the use of @Repository?
3) What is @Transient in Spring boot?
@Transient annotation in JPA or Hibernate is used to indicate that a field is not to be persisted or ignore fields to save in the database.
4) How you will inject service class object into controller?
///
5) Write a java program to find sqare of each number in a list (using streams)?
list.stream().forech(x->x*x). collectors.toList()
6) Can we declare a variable inside an interface?
7) How to access variables from interface?
8) What is intern() in java?
9) Which collection classes will allowed NULL?
10) What happen if we add same key with different values to HashMap?
11) What is the use of load factor?
12) How to make HashMap thread safe?
13) what is the parent class of exception in java?
14) What is the difference b/w function and procedure in SQL?
15) What is composite key in SQL?
16) What is LEFT outer join in SQL?
17) What is the difference between Comparator and Comparable?
18) Can i declare a class as static? if yes What is static inner class?
19) Why should we use interface ?
20) What is the use of Encapsulation?
21) How to make class as immutable?
22) What is the difference b/w Get & Post?
23) What are the advantages of @GetMapping in spring boot?
24) Where to use @GetMapping & Where to use @PostMapping?
25) What are the different parts of http request?
26) What is Serializable(Serializable interface) ?
27) What keyword we will use to not participate in serialization?
28) What is the use of serial version id?
29) How to do the DeSerialization/Serialization?
30) What happen if you dont use serialization?
31) How to connect Java application to Oracle DB?
32) How to connect Spring application to Oracle DB?
33) How to convert a java class to Singleton?
34) Explain about Java8 Features?
35) Explain about the design patterns that you used in your project?
36) Explain about Spring Batch?
37)Explain about CI/CD tools or Jenkins in your project?
38) What are the characteristics of micro services?
39) How to covert webservices to microservices? what are the precautions to take care?
40) What are 12 factors of microservices?
41) What are the main difference between SOAP and RESTfull webservices?
42) What are the advantages of RESTfull webservices?
43) What do you meant by CI/CD tools?
44) How to send data using property files?
45) What Do You Mean by End-To-End Testing of Microservices?
46) How to monitor your applications?
47) How Does PACT Work?
48) What are the different strategies of Microservices Deployment?
49) List the differences between Monolithic, SOA, and Microservices Architecture with an example for each.
50) What is Spring Cloud?
51) Mention the problems that are solved by Spring Cloud?
52) What is Cohesion?
53) What is Coupling?
54) What is DRY in Microservices architecture?
55) What is Spring Cloud Bus? Need for it (or) Where you used Rabbit MQ in your project?
56) What is Hashicorp Valut? How to use it with microservices?
57) Explain JDK, JRE and JVM?
58) Why Java is platform independent?
59) Why Java is not 100% Object-oriented?
60) What is singleton class in Java and how can we make a class singleton?
61) What is the difference between Array list and vector in Java?
62) What are the differences between Heap and Stack Memory in Java?
63) What is JIT compiler in Java?
64) What are instance variables?
65) What is the difference between break and continue statements?
66) What is constructor chaining in Java?
67) Why Java Strings are immutable in nature?
68) Can you override a private or static method in Java?
69) How many types of memory areas are allocated by JVM?
70) If I don't provide any arguments on the command line, then what will the value stored in the String array passed into the main() method, empty or NULL?
71) What if I write static public void instead of public static void?
72) What is the output of the following Java program?
73) What is object-oriented paradigm?
74) What will be the initial value of an object reference which is defined as an instance variable?
75) What is the purpose of a default constructor?
76) Does constructor return any value?
77) Is constructor inherited?
78) Can you make a constructor final?
79) What are the restrictions that are applied to the Java static methods?
80) Can we override the static methods?
81) What if the static modifier is removed from the signature of the main method?
82) Can we make constructors static?
83) Can we make the abstract methods static in Java?
84) Can we declare the static variables and methods in an abstract class?
85) Can we assign the reference to this variable?
86) Can ‘this’ keyword be used to refer static members?
87) Why is multiple inheritance not supported in java?
88) What is the difference between aggregation and composition?
89) Why does Java not support pointers?
90) Can we overload java main() method?
91) Can we override the static method?
92) Why can we not override static method?
93) Can we override the private methods?
94) Can you declare the main method as final?
95) What is the difference between static binding and dynamic binding?
96) What is Java instanceOf operator?
97) Can you use abstract and final both with a method?
98) Is it possible to instantiate the abstract class?
99) Can you declare an interface method static?
100) Can the Interface be final?
101) Can we define private and protected modifiers for the members in interfaces?
102) When can an object reference be cast to an interface reference?
103) How to make a read-only class in Java?
104) How to make a write-only class in Java?
105) How can we access some class in another class in Java?
106) What is the static import?
107) How many types of exception can occur in a Java program?
108) Is it necessary that each try block must be followed by a catch block?
109) Can finally block be used without a catch?
110) Is there any case when finally will not be executed?
111) What is the difference between throw and throws?
112) What is String Pool?
113) How many ways can we create the string object?
115) How can we create an immutable class in Java?
116) How the meta characters are different from the ordinary characters?
117) How many class files are created on compiling the OuterClass in the following program?
118) How can an object be unreferenced?
119) What is the purpose of the Runtime class?
120) How can you make a class serializable in Java?
121) Can a Serialized object be transferred via network?
122) What is Externalizable?
123) What are the ways to instantiate the Class class?
124) What is the purpose of the strictfp keyword?
125) What is the purpose of the System class?
126) What are the advantages of multithreading?
127) What is context switching?
128) Can we make the user thread as daemon thread if the thread is started?
129) When should we interrupt a thread?
130) Does each thread have its stack in multithreaded programming?
131) How is the safety of a thread achieved?
132) What is race-condition?
133) What is the difference between Synchronous programming and Asynchronous programming regarding a thread?
134) What is the difference between ArrayList and LinkedList?
135) What is the difference between Comparable and Comparator?
136) What do you understand by fail-fast?
137) How to make Java ArrayList Read-Only?
138) What's the purpose of Static methods and static variables?
139) What is an infinite Loop? How infinite loop is declared?
140) What is the difference between continue and break statement?
141) What is the difference between double and float variables in Java?
142) How an object is serialized in java?
143) When we should use serialization?
144) What's the difference between an array and Vector?
145) When a lot of changes are required in data, which one should be a preference to be used? String or StringBuffer?
146) In multi-threading how can we ensure that a resource isn't used by multiple threads simultaneously?
147) Can we call the constructor of a class more than once for an object?
148) Explain about Access Specifiers?
149) Can the static methods be overloaded?
150) Can the static methods be overridden?
151) Why is the character array preferred over string for storing confidential information?
152) How can you swap the values of two numeric variables without using any other variables?
153) Is a finally block executed when an exception is thrown from a try block that does not have a catch block, and if so, when?
154) What is meant by Ordered and Sorted in collections?
155) What is the difference between synchronized and concurrent Collection in Java?
156) How ConcurrentHashMap works in Java?
156 A)What is the difference between ArrayList and Vector in Java
157) Difference between extends and super in Java Generics?
158) What do you mean by thread-safe collection? Give an example of 2 thread-safe Collection in Java?’
159) What is the relationship between equals and compareTo in Java?
160) What is the default size of ArrayList ,HashMap,HashSet,HashTable, Vector in Java?
161) What is the load factor, capacity, and Size of the Collection in Java?
162) What is the difference between fail-safe and fail-fast Iterator in Java?
163) How do you find if an ArrayList contains an Object or not?
164) Can we store Integer in an ArrayList<Number> in Java?
165) How do you sort a Collection in Java?
166) What is IdentityHashMap,WeakHashMap in Java?
167) How do you remove an Object from Collection?
168) Difference between Web application & Web Services?
169) What is Spring Boot and What Are Its Main Features?
170) What Are the Differences Between Spring and Spring Boot.
171) What is Spring Initializer?
172) How to Disable a Specific Auto-Configuration?
173) How to Register a Custom Auto-Configuration?
174) What are the Spring Boot Starters?
175) How can you access a value defined in the application.proprties? What is properties file in Spring Boot?
176) What is the main difference between JPA and Hibernate?
177) What is a shutdown in the actuator?
178) What are Filters?
179) How to handle exception in Spring Boot?
180) What is mean by spring batch?
181) Explain CORS in Spring Boot?
182) Explain the difference between an embedded container and a WAR.
183) What do you mean by aspect?
184) Is excluding package without using the basePackages filter is possible? How?
185) What is Spring Boot dependency management?
186) What are the differences between @RequestMapping and @RestController?
187) Mention the differences between JPA and Hibernate ?
188) How is Hibernate chosen as the default implementation for JPA without any configuration?
189) In which layer, should the boundary of a transaction start?
190) What is relaxed binding?
191) What is Spring Batch? How do you implement it using Spring Boot?
192) How to implement interceptors with Spring Boot?
193) Explain about Spring Schedulers?
194) What is the difference between an embedded container and a WAR?
195) What embedded containers does Spring Boot support?
196) What is @Qualifier annotation in Spring?
197) What happens when you inject prototype bean into singleton bean? Can you explain the behavior?
198) What are the major features in different versions of Spring Framework?
199) List some of the benefits of IoC.
200) What do you understand by @RequestMapping annotation?
201) Describe Spring DAO support?
202) Name the exceptions thrown by the Spring DAO classes.
203) What are the ways by which Hibernate can be accessed using Spring?
204) Explain WebApplicationContext.
205) What are the new features in Spring 5?
206) What is Spring WebFlux?
207) How to get ServletContext and ServletConfig object in a Spring Bean?
208) Does Spring Bean provide thread safety?
209) What is DispatcherServlet and ContextLoaderListener?
210) What is a MultipartResolver and when it’s used?
211) What is Spring MVC Interceptor and how to use it?
212) How would you achieve Transaction Management in Spring?
213) What is Spring Security?
214) Difference between @Autowired and @ Inject annotation in Spring?
215) How is the configuration metadata provided to the Spring container?
216) Are Singleton beans thread-safe in Spring Framework?
217) Are there any limitations with autowiring?
218) Explain the RowCallbackHandler in Spring?
219) When are declarative and programmatic transaction management used?
220) What is difference between singleton and prototype bean?
221) In what points, can weaving be applied?
222) What is DataAccessException?
223) What is cross cutting concern and concern in spring AOP?
224) Where did you used multi threading in your project?
225) How many ways we can create a thread?
226) Explain about JWT? Or How you provide security to your Rest API’s ?