what is diff string and stringbuffer

Answer Posted / gayathri

String is immutable that once the value assigned to object
cannot be modified.Suppose if we want to perform
concatenation another string object will be prepared and
the value is going to assign for that object.in total we
are having 2 objects

StringBuffer is Mutable we can change the value of the
object even the value is assigned to the object.

Is This Answer Correct ?    29 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is java collection? : java collections

564


Which java collection class can be used to maintain the entries in the order in which they were last accessed?

546


What are the types of interface used in the java collections? : java collections

581


Which interface does java.util.hashtable implement?

656


What is the use of hashcode in java ?

566






How do I find jre path in windows?

514


What is an algorithm in java collection framework? : java collections

564


my interviewer asked me what technical specification you used how to answer that question

1922


What are the interfaces in java collections? : java collections

600


What are the types of the main implementing classes in the map interfaces? : java collections

600


What are the different types of features of the java collections framework? : java collections

559


What are maps interfaces in the java collections? : java collections

563


What are the classes in the java collection framework? : java collections

580


What are the differences between the java collection and the java list? : java collections

600


What is the enumerator of the java collection framework? : java collections

555