Frage im Vorstellungsgespräch bei FabHotels

What is immutability in java, how internally is it achieved in java?

Antwort im Vorstellungsgespräch

Anonym

6. Jan. 2026

Classes whose objects cannot be modified are immutable. Internally such classes have: - fields as private - initialisation through constructor - declare class as final - return deep copies of mutable fields of this class