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
Explain illegalmonitorstateexception and when it will be thrown?
How does predicate work in java?
What about method local inner classes or local inner classes in java?
Can java list be null?
What is a list in java?
Which is bigger float or double?
What is the difference between math floor and math round?
Explain about varargs in java?
What is java and their uses?
What do you mean by aggregation?
When a thread is executing synchronized methods , then is it possible to execute other synchronized methods simultaneously by other threads?
Is oracle java 11 free?
What are the 6 mandatory procedures for iso 9001?
Why is the main method static?
Can we override private constructor in java?