Tag Archives: How to create Immutable Class and Object in Java

Immutable Objects in java

If we can not modify the object after creation that object is called Immutable object. String is the best example for Immutable Object. Rules for making the objects Immutable: Class should be final. Class members should be final. If we have any mutable object in our class then return the copy of that object through Continue Reading…