Core Java
OOP, SOLID, Object class, equality, Strings, immutability, wrappers, enums, records, sealed classes, var and pass-by-value.
OOP Principles
Classes, objects and the four pillars: encapsulation, inheritance, polymorphism and abstraction.
SOLID Principles
Five object-oriented design principles for clean, maintainable, loosely coupled code.
Object Class
The root of every Java class: toString, equals, hashCode, clone, getClass, wait/notify and finalize.
equals() and hashCode()
Logical equality, the hashCode contract and how HashMap and HashSet use both methods internally.
== vs equals()
Reference comparison vs logical equality, with String pool, wrapper caching, enum and null-check cases.
String, StringBuilder & StringBuffer
Immutability, the String Constant Pool, mutable builders, capacity growth and choosing the right class.
Immutable Objects
What immutability means, why Java relies on it, and the rules for building truly immutable classes.
Wrapper Classes & Autoboxing
Object versions of primitives, autoboxing and unboxing, Integer caching and the null-unboxing trap.
Enums
Type-safe constants with fields, constructors and behaviour, plus EnumSet, EnumMap and JPA persistence.
Records (Java 16+)
Compact, immutable data carriers with generated constructors, accessors, equals, hashCode and toString.
Sealed Classes (Java 17+)
Controlled inheritance with permits, final, sealed and non-sealed, and how it pairs with pattern matching.
var Keyword (Java 10+)
Local variable type inference: what the compiler infers, where var is allowed and where it is not.
Pass by Value in Java
Why Java is always pass-by-value, and what really happens when you pass primitives, objects, Strings and arrays.