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


Please Help Members By Posting Answers For Below Questions

Explain illegalmonitorstateexception and when it will be thrown?

613


How does predicate work in java?

529


What about method local inner classes or local inner classes in java?

546


Can java list be null?

545


What is a list in java?

500






Which is bigger float or double?

514


What is the difference between math floor and math round?

497


Explain about varargs in java?

576


What is java and their uses?

544


What do you mean by aggregation?

561


When a thread is executing synchronized methods , then is it possible to execute other synchronized methods simultaneously by other threads?

563


Is oracle java 11 free?

522


What are the 6 mandatory procedures for iso 9001?

525


Why is the main method static?

593


Can we override private constructor in java?

500