1.

What Do You Understand By Mutable And Immutable Objects?

Answer»

If the value of the OBJECT can be changed then it is REFERRED to as a Mutable object. If after the creation of an objects, it value cannot be changed then it is an immutable object. String, Integer, Float in java are EXAMPLES of immutable object WHEREAS StringBuffer object is an example of mutable object in java.

If the value of the object can be changed then it is referred to as a Mutable object. If after the creation of an objects, it value cannot be changed then it is an immutable object. String, Integer, Float in java are examples of immutable object whereas StringBuffer object is an example of mutable object in java.



Discussion

No Comment Found