JAVA FOUNDATION MASTER DOCUMENT
1. How Java Works (Core Architecture)
• JDK: Java Development Kit (compiler + tools).
• JRE: Java Runtime Environment (JVM + libraries).
• JVM: Executes bytecode.
• Compilation Flow: .java -> javac -> .class (bytecode) -> JVM execution.
• Platform independence through bytecode.
2. Memory Management
• Stack: Method calls, local variables, references.
• Heap: Objects and instance variables.
• Method Area: Class metadata.
• Garbage Collection basics.
• Stack vs Heap behavior during object creation.
3. Object-Oriented Programming Deep Understanding
• Encapsulation: Protecting state with controlled access.
• Abstraction: Hiding implementation details.
• Inheritance: Code reuse and hierarchy.
• Polymorphism: Method overriding and dynamic binding.
4. Core Language Mechanics
• Constructors and object initialization flow.
• this and super keywords.
• Static vs Instance members.
• Access modifiers and package structure.
5. Collections Framework Deep Dive
• ArrayList internal resizing mechanism.
• HashMap internal structure (bucket, hash, collision).
• equals() and hashCode() contract.
• HashSet behavior.
• Comparable vs Comparator.
6. Exception Handling Philosophy
• Checked vs Unchecked exceptions.
• Exception hierarchy.
• Custom exceptions.
• Best practices in exception design.
7. Multithreading Foundations
• Thread lifecycle.
• Race conditions.
• synchronized keyword.
• volatile keyword meaning.
• Executor framework basics.
8. Modern Java Features
• Functional Interfaces.
• Lambda expressions.
• Streams (map, filter, reduce).
• Optional usage philosophy.
9. JVM and Advanced Internals
• Class loading mechanism.
• String Pool.
• Garbage collection types.
• Memory leaks in Java.
• Reflection basics.
10. Mastery Checklist
• Explain HashMap collision handling without reference.
• Explain why String is immutable.
• Create your own small collection class.
• Write thread-safe code example.
• Explain equals/hashCode impact in HashSet.