Core Programming (Basics & Intermediate) –
1. What is the difference between compiler and interpreter?
2. What are primitive data types in Java?
3. Difference between int and Integer.
4. What is type casting? Types of casting?
5. What is JVM, JRE, and JDK?
6. How memory is allocated for variables in Java?
7. Difference between stack and heap memory.
8. What is garbage collection?
9. How does Java achieve platform independence?
10.What is pass-by-value in Java?
11.Difference between final, finally, and finalize().
12.What are wrapper classes?
13.Why main method is static?
14.Can we change the return type of main method?
15.What is command line argument?
16.Difference between break and continue.
17.What is implicit vs explicit casting?
18.Why Java is strongly typed?
19.What happens if memory is full?
20.Why Java does not support pointers?
2️⃣ OOP Concepts (Basic & Advanced) –
21.What are the four pillars of OOP?
22.Difference between abstraction and encapsulation.
23.Can we achieve multiple inheritance in Java?
24.Difference between interface and abstract class.
25.What is runtime polymorphism?
26.How method overriding works internally?
27.Can constructors be overridden?
28.Can static methods be overridden?
29.What is upcasting and downcasting?
30.Why composition is preferred over inheritance?
31.What is object cloning?
32.Difference between shallow copy and deep copy.
33.What is marker interface?
34.Can an interface extend another interface?
35.Can a class implement multiple interfaces?
36.Why private methods cannot be overridden?
37.What is dynamic binding?
38.Can we create object of abstract class?
39.What is tight vs loose coupling?
40.What is immutability?
3️⃣ Data Structures and Algorithms –
41.Difference between array and linked list.
42.Time complexity of array operations.
43.Why linked list insertion is faster?
44.Difference between stack and queue.
45.Applications of stack.
46.What is recursion?
47.What causes stack overflow?
48.Difference between BFS and DFS.
49.What is binary search?
50.Why binary search requires sorted data?
51.What is hashing?
52.What is collision in hashing?
53.Difference between linear and quadratic probing.
54.What is balanced tree?
55.Difference between BST and AVL tree.
56.What is heap data structure?
57.What is Big-O notation?
58.Difference between Big-O and Big-Theta.
59.Worst-case complexity of quicksort.
60.Why merge sort uses extra space?
4️⃣ Java Collections, Streams, Exception Handling & Java 8
–
61.Difference between Collection and Collections.
62.List vs Set vs Map.
63.ArrayList vs LinkedList.
64.HashMap vs Hashtable.
65.How HashMap works internally?
66.What happens when hash collision occurs?
67.What is fail-fast iterator?
68.What is Stream API?
69.Difference between stream and collection.
70.map() vs flatMap().
71.What is lambda expression?
72.What is functional interface?
73.What is Optional?
74.Why Optional avoids NullPointerException?
75.Checked vs unchecked exception.
76.Difference between throw and throws.
77.What is custom exception?
78.try-with-resources.
79.What happens if exception not handled?
80.Can we have multiple catch blocks?
5️⃣ Regex, JUnit & Annotations –
81.What is regex?
82.Difference between regex and wildcard.
83.Meaning of *, +, and ? in regex.
84.What is greedy matching?
85.What is capturing group?
86.Regex to validate email.
87.What is JUnit?
88.Difference between JUnit 4 and JUnit 5.
89.What is @Test annotation?
90.What is @BeforeEach?
91.What is unit testing?
92.Why unit testing is important?
93.What is mocking?
94.What is Mockito?
95.What is annotation?
96.Types of annotations.
97.What is @Override?
98.What is @Deprecated?
99.Custom annotation use case.
100. Runtime vs compile-time annotations.