why String class is immutable.

Answer Posted / rakesh

For save the memory and reduce the response time.
StringBuffer provide an alternet for String class object,
which is muttable.

Is This Answer Correct ?    5 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What about interthread communication and how it takes place in java?

799


What is the basic concepts of OOPS?

916


What are JVM.JRE, J2EE, JNI?

890


Explain 5 features introduced in jdk 1.7?

808


I want to store more than 10 objects in a remote server? Which methodology will follow?

2880


What is a treeset in java?

754


what is use of functional interface in java 8?

785


What is a void method?

700


How to handle a web browser resize operation?

751


What is entry in java?

806


Which is faster call by value or call by reference?

706


What are the principle concepts of oops?

737


What's the purpose of static methods and static variables?

803


What is method overloading in JAVA? Why is it not present in C ?

798


Can you create an object of an abstract class?

769