Here is the Java interview questions with their justification on various topics
OOPS concept
- Constructor in Java
- Interface in Java
- Interface in Java 8
- Abstract classes and method in Java
- Method Overriding in Java
- Method Overloading in Java
- Various ways to create Object in Java – 4 ways
Java keywords
Core Java
- Exception handling interview question
- Interview question on Java collection framework overview
- Java Collection Interview question and answers
- Generics interview question and answers
- Serialization interview question and answers
Advanced Java / JDBC
Difference between
- Interface v/s Abstract Classes
- Method v/s Constructor
- Default constructor v/s Parametrized constructor
- Static Initialization blocks v/s Instance Initialization blocks
- Method Overriding v/s Method Overloading
- ArrayList v/s LinkedList
- Arrays v/s ArrayList
- ArrayList v/s Vector
- Enumeration v/s Iterator v/s ListIterator interfaces
- Comparable v/s Comparator
- HashSet v/s LinkedHashSet
- List v/s Set
- HashMap v/s Hashtable
- HashMap v/s HashSet
- HashMap v/s LinkedHashMap v/s TreeMap
- HashMap vs LinkedHashMap
- HashSet v/s LinkedHashSet v/s TreeSet
- ConcurrentHashMap v/s HashMap
- ConcurrentHashMap v/s SynchronizedMap
- CopyOnWriteArrayList v/s ArrayList
- CopyOnWriteArrayList v/s SynchronizedList
- CopyOnWriteArraySet v/s HashSet
- CopyOnWriteArraySet v/s SynchronizedSet
- Error v/s Exception
- throw v/s throws in Java
- final v/s finally v/s finalize
- Checked Exception v/s Unchecked Exception
- Difference between ClassNotFoundException v/s NoClassDefFoundError
- Serializable v/s Externalizable
- REST v/s SOAP
- Local v/s Remote v/s Central Repositories in Apache Maven
- BeanFactory v/s ApplicationContext in Spring
- throws clause v/s try-catch-finally block
Interview programs
- Declaration, Definition, Initialization and Instantiation, Instance of class
- Why the execution order of Constructor and Initialization blocks is pre-defined?
- Interview program on String using toString() method
- Interview program on String using null
- Interview program on static method in Java
- Interview question on ModelAndView and DispatcherServlet in Spring MVC
- Java – Throw exception when second instance is created
Duplicate count programs
- Java 8 – Find employee count in each department ?
- Java 8 – Find duplicate count from Integer arrays ?
Design pattern
- Singleton design pattern – restricting all 4 ways of Object creation in Java
- Java Interview – How to create Thread-safe Singleton class ?
- How to construct an immutable class in Java
Spring framework
- Spring Boot – Interview question on server port configuration
- Spring MVC – Interview question on ModelAndView and DispatcherServlet
Upcoming articles
- String interview question
- Threads & Multi-Threading interview question
- File Handling interview question
Suggest tutorials from Contact Us page