Difference between the String and StringBuffer classes?

Answers were Sorted based on User's Feedback



Difference between the String and StringBuffer classes?..

Answer / anitha

yes, String is a immutable that means once the string
object is created it cannot be changed.

String Buffer: it is a mutable,this object is changed if we
make any modifications.

Is This Answer Correct ?    8 Yes 0 No

Difference between the String and StringBuffer classes?..

Answer / sathya

String class is immutable i.e oncle created the value
cannot chage.

Stringbuffer class is mutable.The value can change.

Is This Answer Correct ?    5 Yes 0 No

Difference between the String and StringBuffer classes?..

Answer / latha

String is immutable and StringBuffer is mutable as most of
we know. In performance, StringBuffer is faster than the
String while performing simple concatenations.

Is This Answer Correct ?    5 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is the difference between Java1.4 and Java1.5

0 Answers   NIIT,


What is passing by reference in java?

0 Answers  


What are other modifiers?

2 Answers   Wipro,


What is the structure of java?

0 Answers  


What is the difference between and ?

0 Answers  






Find the value of a specified element of the array arr[i] where 0 <= i <= n-1

0 Answers   Amazon,


if two references are having same hash codes,is that means those are refering to same object?

5 Answers   CTS,


What is race condition ?? (Threading concept) TCS 2 sept10

3 Answers   SparkTG, TCS,


What is class forname?

0 Answers  


How can we make string upper case or lower case?

0 Answers  


What are possible key words, we can use to declare a class?

2 Answers   Tech Mahindra,


Can I use % with real numbers?

0 Answers  


Categories