Skip to main content

3 docs tagged with "immutability"

View all tags

Encapsulation

Hide internal state behind a controlled interface — access modifiers, getters/setters, and the art of designing immutable classes.

Records (Java 16+)

Java's concise immutable data carrier — understand what records generate automatically, compact constructors, and when records replace traditional value classes.

Strings

String immutability, the string pool, StringBuilder, and the most useful String APIs in Java.