what is mutability?which one is mutable String or StringBuffer?and why?give
examples of each which shows the mutability of each String or StringBuffer
Answer Posted / surya simhadri
Mutability means which can be changed. StringBuffer is a
mutable bcoz the contents of the SB object we can change,
it can't create new reference location even though we
change the value it already referenced. But in case of
String it reference location is changed every time if u
change the content.
| Is This Answer Correct ? | 58 Yes | 2 No |
Post New Answer View All Answers
Is java 11 paid version?
Explain about doubly linked list
What is meant by 'bit masking' in java?
What is array command?
What is the purpose of java?
what is the purpose of "virtual"?
What is function overriding and overloading in java?
What is the symbol for space?
is there a separate stack for each thread in java? : Java thread
How many digits is int32?
What is a method in java?
What do you understand by access specifiers in Java?
Why are getters and setters used?
What kind of variables a class can consist of?
Is static variable stored in heap?