why String class is immutable.

Answer Posted / vikrant

Once a string object is created no changes can be made to
it. If a string is modified in code a new object will be
created. That is why string is immutable

Is This Answer Correct ?    24 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What two classes are used to read data only?

640


How to create a custom exception?

574


What is ctrl m character?

518


How do you add an arraylist to an array in java?

511


What is the program development process?

565






What are the basic interfaces of java collections framework?

608


Why does the integer quotient -0/3 yield 0, but the double quotient -0.0/3.0 yields – 0.0?

608


What is a type parameter in java?

532


Does google use java?

540


What is skeleton and stub? What is the purpose of those?

540


what is the swingutilities.invokelater(runnable) method for? : Java thread

549


What is public static void main?

571


What are loops in java? What are three types of loops?

551


What differences exist between iterator and listiterator?

573


What are abstract methods in java?

655