# 📚 100 Essential Java Interview Questions
#Java #Interview #Programming #OOP #Collections #Multithreading
---
## 🔹 Core Java (20 Questions)
1. What is JVM, JRE, and JDK?
2. Explain
3. Difference between == and
4. What are Java primitives? List all 8.
5. Explain autoboxing/unboxing
6. What are varargs?
7. Difference between
8. What are immutable objects? How to create them?
9. Explain
10. What are annotations? Common built-in annotations?
11. Difference between
12. What is
13. Can we override static methods?
14. What is method overloading vs overriding?
15. What is
16. Explain pass-by-value in Java
17. What are wrapper classes? Why needed?
18. What is enum? When to use?
19. Difference between
20. What is type casting? Implicit vs explicit
---
## 🔹 OOP Concepts (15 Questions)
21. 4 Pillars of OOP with examples
22. What is abstraction vs encapsulation?
23. Difference between abstract class and interface (Java 8+)
24. Can an interface have constructors?
25. What is polymorphism? Runtime vs compile-time
26. What is method hiding?
27. What is composition vs inheritance?
28. What is the Liskov Substitution Principle?
29. How to achieve multiple inheritance in Java?
30. What is a singleton? Thread-safe implementation
31. What is a factory pattern?
32. What is a marker interface?
33. What is a POJO?
34. What is the
35. What is object cloning? Shallow vs deep copy
---
## 🔹 Collections Framework (15 Questions)
36. Collections hierarchy diagram explanation
37. Difference between
38.
39.
40.
41. How
42. What is hashing? Hashcode/equals contract
43. What is
44. Fail-fast vs fail-safe iterators
45. How to make collections immutable?
46. What is
47. Difference between
48. What are Java 8 stream APIs?
49.
50. What are collectors? Common collectors
---
## 🔹 Exception Handling (10 Questions)
51. Exception hierarchy in Java
52. Checked vs unchecked exceptions
53. What is
54. Can we have
55. What is exception propagation?
56. Difference between
57. How to create custom exceptions?
58. What is
59. Best practices for exception handling
60. What is
---
## 🔹 Multithreading (15 Questions)
61. Process vs thread
62. Ways to create threads
63.
64. Thread lifecycle states
65. What is synchronization?
66.
67. What are volatile variables?
68. What is deadlock? How to avoid?
69. What is thread starvation?
70.
71. What is thread pool? Executor framework
72. What is
73. What is atomic variable?
74. What is
75. Concurrent collections in Java
---
## 🔹 Java 8+ Features (10 Questions)
76. What are lambda expressions?
77. Functional interfaces in Java
78. Method references types
79.
80. Stream API operations
81.
82. What are default methods?
83. What are static methods in interfaces?
84. New Date/Time API benefits
85. Records and sealed classes
---
## 🔹 JVM & Performance (10 Questions)
86. JVM architecture overview
87. What is classloader?
88. What is bytecode?
89. What is JIT compiler?
90. Heap memory structure
91. What is garbage collection? Types of GC
92.
93. How to handle memory leaks?
94. What is
95. JVM tuning parameters
---
#Java #Interview #Programming #OOP #Collections #Multithreading
---
## 🔹 Core Java (20 Questions)
1. What is JVM, JRE, and JDK?
2. Explain
public static void main(String[] args) 3. Difference between == and
.equals()? 4. What are Java primitives? List all 8.
5. Explain autoboxing/unboxing
6. What are varargs?
7. Difference between
String, StringBuilder, and StringBuffer 8. What are immutable objects? How to create them?
9. Explain
final, finally, and finalize 10. What are annotations? Common built-in annotations?
11. Difference between
throw and throws 12. What is
static keyword? 13. Can we override static methods?
14. What is method overloading vs overriding?
15. What is
this and super keywords? 16. Explain pass-by-value in Java
17. What are wrapper classes? Why needed?
18. What is enum? When to use?
19. Difference between
instanceof and getClass() 20. What is type casting? Implicit vs explicit
---
## 🔹 OOP Concepts (15 Questions)
21. 4 Pillars of OOP with examples
22. What is abstraction vs encapsulation?
23. Difference between abstract class and interface (Java 8+)
24. Can an interface have constructors?
25. What is polymorphism? Runtime vs compile-time
26. What is method hiding?
27. What is composition vs inheritance?
28. What is the Liskov Substitution Principle?
29. How to achieve multiple inheritance in Java?
30. What is a singleton? Thread-safe implementation
31. What is a factory pattern?
32. What is a marker interface?
33. What is a POJO?
34. What is the
instanceof operator used for? 35. What is object cloning? Shallow vs deep copy
---
## 🔹 Collections Framework (15 Questions)
36. Collections hierarchy diagram explanation
37. Difference between
List, Set, and Map 38.
ArrayList vs LinkedList 39.
HashSet vs TreeSet 40.
HashMap vs HashTable vs ConcurrentHashMap 41. How
HashMap works internally? 42. What is hashing? Hashcode/equals contract
43. What is
Comparable vs Comparator? 44. Fail-fast vs fail-safe iterators
45. How to make collections immutable?
46. What is
PriorityQueue? 47. Difference between
Iterator and ListIterator 48. What are Java 8 stream APIs?
49.
map() vs flatMap() 50. What are collectors? Common collectors
---
## 🔹 Exception Handling (10 Questions)
51. Exception hierarchy in Java
52. Checked vs unchecked exceptions
53. What is
try-with-resources? 54. Can we have
try without catch? 55. What is exception propagation?
56. Difference between
throw and throws 57. How to create custom exceptions?
58. What is
Error vs Exception? 59. Best practices for exception handling
60. What is
@SuppressWarnings? ---
## 🔹 Multithreading (15 Questions)
61. Process vs thread
62. Ways to create threads
63.
Runnable vs Callable 64. Thread lifecycle states
65. What is synchronization?
66.
synchronized keyword usage 67. What are volatile variables?
68. What is deadlock? How to avoid?
69. What is thread starvation?
70.
wait(), notify(), notifyAll() methods 71. What is thread pool? Executor framework
72. What is
Future and CompletableFuture? 73. What is atomic variable?
74. What is
ThreadLocal? 75. Concurrent collections in Java
---
## 🔹 Java 8+ Features (10 Questions)
76. What are lambda expressions?
77. Functional interfaces in Java
78. Method references types
79.
Optional class purpose 80. Stream API operations
81.
map() vs flatMap() 82. What are default methods?
83. What are static methods in interfaces?
84. New Date/Time API benefits
85. Records and sealed classes
---
## 🔹 JVM & Performance (10 Questions)
86. JVM architecture overview
87. What is classloader?
88. What is bytecode?
89. What is JIT compiler?
90. Heap memory structure
91. What is garbage collection? Types of GC
92.
String pool concept 93. How to handle memory leaks?
94. What is
OutOfMemoryError? Common causes 95. JVM tuning parameters
---