remember it daily
1. Core Java (OOPs, Logic, & Memory)
-
- OOPs Fundamentals: Explain the 4 pillars (Abstraction, Encapsulation, Inheritance, Polymorphism)
-
- Diamond Problem: What is the diamond problem in inheritance, and how does Java solve it using Interfaces?
-
- Inheritance Types: What types of inheritance does Java support? Why is multiple inheritance not supported for classes?
-
- Keywords: Difference between final, finally, and finalize
-
- Volatile vs. Synchronized: Explain the difference between the volatile keyword and synchronized blocks
-
- Method Overloading vs. Overriding: Provide examples. Can we change the access modifier/scope of a method when overriding?
-
- Parent-Child Access: If Class A has private, protected, default, and public methods, which can be overridden in a different package?
-
- Memory Management: What is the difference between Heap and Stack? What specific info is stored in each?
-
- PermGen vs. Metaspace: Explain the difference and why Java 8 moved to Metaspace
-
- Object Creation: How many ways can you create an object? If a String is created with new, how many objects are created?
- Serialization and Deserialization in Java
-
- Immutable Strings: Why are Strings immutable? Explain the String Constant Pool
-
- Abstract vs. Interface: Why can we not create an object of an abstract class? Can we have non-abstract methods in an abstract class?
-
- Constructors: Can we create a parameterized constructor in an abstract class? If yes, how do we set values?
-
- Garbage Collection: Explain GC implementation and the algorithms used (e.g., G1GC)
-
- Wrapper Classes: Why do we need wrapper classes? Compare Wrapper vs. Primitive
-
- Generics: What are Generics in Java, and why are they used?