Encapsulation
Hide internal state behind a controlled interface — access modifiers, getters/setters, and the art of designing immutable classes.
Hide internal state behind a controlled interface — access modifiers, getters/setters, and the art of designing immutable classes.
How to create truly immutable List, Set, and Map instances in Java using the Java 9+ factory methods and how they differ from the older Collections.unmodifiable wrappers.
Java's concise immutable data carrier — understand what records generate automatically, compact constructors, and when records replace traditional value classes.
Java's text APIs — String immutability and the string pool, mutable alternatives with StringBuilder, and declarative list-joining with StringJoiner.
String immutability, the string pool, StringBuilder, and the most useful String APIs in Java.
Three design-level strategies for writing correct concurrent code — immutability, ThreadLocal confinement, and explicit object confinement — without reaching for locks.