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
Can you make a constructor final in Java?
What is an immutable object?
What are java packages? What's the significance of packages?
What is pre increment and post increment in java?
What is the role of garbage collector in java?
what is singleton in java?
Explain about the performance aspects of core java?
What is wrapper class example?
Is java code slower than native code?
Can we serialize singleton class?
What is nested top-level class?
What is java english?
What is module with example?
Differentiate between class and structure.
Define class?