As per the dictionary, mutable objects are objects which can change their values and immutable objects are objects which cannot have their values changed.
>>java.lang.String is an example of an immutable object in Java
whereas
>>java.lang.StringBuffer is a mutable object.
No comments:
Post a Comment