What is mutable object and immutable object?
Answer / Hemlata Mishra
A mutable object is an object whose state can be changed after it is created. For example, a StringBuffer in Java is a mutable object because you can modify its contents by calling methods like append(), insert(), delete() etc. An immutable object, on the other hand, cannot be modified once it's created. A String in Java is an example of an immutable object.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is hash code collision?
What are the classes of java?
What is the difference between the boolean & operator and the && operator in java programming?
How to use scanner in java?
Which arithmetic operations can result in the throwing of an arithmeticexception?
How do we access static members in java?
What are 3 data types?
Are true and false keywords?
What is string [] java?
what is purpose of writting public static void main(Strind arg[]) in java..?
When wait(), notify(), notifyall() methods are called does it releases the lock or holds the acquired lock?
Which of these methods belong to Thread & Object class? join, yield, sleep, wait, notify