mutator methods Archive
24 Sep 2014
Immutable Classes and Objects in java

If the content of an object is unchangeable once the object is created, such object is known as immutable object and its class is known as immutable class. To design immutable class, make all data fields private and don’t write any mutator method (use to set data fields ) or any accessor method ( use