Which of the below classes will create immutable object?
String is both an immutable class, and has the capability to create an immutable object. It is an example of strong immutability also.
String is an immutable class, and if you create an object by using String class, then it will become immutable object.
String class is immutable class - because it is a final class.
String objects are immutable objects - because once a String object is created, no body can change its content or values.
Back To Top