Difference between String & StringBuffer

Answer Posted / tashu

1)String class is of fixed length, but stringbuffer class is
of variable length.

2)String class can't insert character or sub string in the
middle of string, but in Stringbuffer class this is possible.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the use of volatile field modifier?

627


Is alive in java?

502


Is object a data type?

552


How can you say java is object oriented?

583


Realized?

1652






What is meant by anonymous class?

585


What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?

617


What is the difference between iterator and enumeration ?

510


What is a variable declaration?

515


What is the SimpleTimeZone class?

1792


What is the properties class in java programming?

540


What are the advantages of encapsulation in java?

547


What is the use of default method in interface in java?

545


What is the difference between declaration and definition in java?

512


Can string be considered as a keyword?

561