String is mutable or immutable?

Answer Posted / tanveer

String class is immutable .To make the String immutable use String Buffer or String Builder classes which are mutable

Is This Answer Correct ?    14 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is public/private protected in java?

795


What are the basics of core java?

766


What is the access scope of a protected method?

761


State two differences between C and Java.

969


Why put method is used?

775


How do you declare an array that will hold more than 64KB of data?

927


What is immutable in java?

790


Explain runtime exceptions?

938


Can a method inside a interface be declared as final?

736


What is the difference between hashmap and hashtable? What is an interface?

803


Is vector thread safe in java?

783


What is prefix of a string?

810


Detail discussions on JVM, memory management and garbage collector.

756


What is the difference between static class and normal class?

757


What is the need of transient variables in Java ?

817