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 do the thread?class methods run() and start() do?

795


What is wrapper class html?

734


What is the collections api?

800


Explain thread life cycle in java?

798


What is the SimpleTimeZone class?

2025


What do you know about the garbage collector in java?

833


Can we sort list in java?

806


What is the list interface in java programming?

814


Is string a data type in java?

821


Difference between this() and super() in java ?

824


Does apple use java?

714


What is java developer skills?

760


How to sort list of list in java?

885


What data structures are used to perform recursion?

819


Explain jdk, jre and jvm?

782