string is immutable? right every one knows that, my
question is it advantage or disadvantage making string
immutable?
Answer Posted / payal gupta
It is an advantage that a String class is immutable because
almost all the standard classes use its methods, if they
were mutable, then the behaviour of other standard classes
and their methods would not have been consistent.
| Is This Answer Correct ? | 7 Yes | 7 No |
Post New Answer View All Answers
What is the need of transient variables in Java ?
What state does a thread enter when it terminates its processing in java programming?
What is the size of arraylist in java?
How to do encapsulation in java?
What does += mean coding?
What is the list interface in java programming?
Differentiate between postfix and prefix operators in java.
How big is a boolean?
What is the difference between an argument and a parameter?
What is the meaning of 3 dots in java?
Explain the transient field modifier?
Can java list contain duplicates?
What is tcp ip in java?
How does arraylist work in java?
What does ide stand for?