The Depths of Immutable Class Design — 1
Beware of Getters and Mark the class as “final”
Have you ever wondered why we need to mark the class as
final, and why no setters, why
private final fields while designing Immutable classes in Java?
We all know the rules of creating immutable classes. If you aren’t aware of those rules there are tons of articles on Medium already written…