What does it mean to be immutable?



What does it mean to be immutable?..

Answer / Ajay Kumar Bhartiya

In Java, an object is considered immutable if its state cannot be modified after creation. Strings in Java are examples of immutable objects because once a String object is created, you cannot change the characters stored within that object.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is the similarity between dynamic binding and linking?

1 Answers  


Which sort is best in java?

1 Answers  


What is string made of?

1 Answers  


How do you detect memory leaks?

1 Answers  


What is the life cycle of an Applet ?

1 Answers  


Why is stringbuffer called mutable?

1 Answers  


What method is used to specify a container's layout in java programming?

1 Answers  


Explain the different forms of polymorphism?

1 Answers  


When do you get classcastexception?

1 Answers  


Is Constructor possible in abstract class in java ?

1 Answers   HCL,


Write an algorithm for quick sort?

1 Answers   Virtusa,


What is the benefit of inner classes in java?

1 Answers  


Categories