Java Interview Questions – Quick Revision PDF
Core Java
1 What is JVM, JRE, and JDK?
2 Why is Java platform independent?
3 Explain OOP concepts in Java.
4 Difference between == and equals().
5 Why is String immutable?
6 Difference between String, StringBuilder, and StringBuffer.
7 What is constructor? Can it be private?
8 Difference between method overloading and overriding.
9 Difference between abstract class and interface.
10 What is final keyword?
Memory & JVM
1 Difference between Heap and Stack memory.
2 What is Garbage Collection?
3 What is OutOfMemoryError?
4 What is classloader?
5 What is memory leak?
Exception Handling
1 Difference between checked and unchecked exceptions.
2 Difference between throw and throws.
3 Explain try-catch-finally.
4 Can finally run without catch?
5 Can we have multiple catch blocks?
Multithreading
1 What is thread?
2 Difference between Thread and Runnable.
3 What is synchronization?
4 What is deadlock?
5 Difference between sleep() and wait().
Collections Framework
1 Difference between Array and ArrayList.
2 Difference between ArrayList and LinkedList.
3 Difference between HashMap and Hashtable.
4 How does HashMap work internally?
5 What is fail-fast iterator?
Java 8
1 What is lambda expression?
2 What is functional interface?
3 What is Stream API?
4 Difference between map() and flatMap().
5 What is Optional class?
Coding Questions
1 Reverse a string.
2 Check palindrome.
3 Find duplicate elements in array.
4 Find second largest element.
5 Count frequency of characters.