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

Why runnable interface is used in java?

0 Answers  


Why do inner class cannot have static declaration except static nested class?

2 Answers   TCS, Wipro,


What is thread priority?

1 Answers   Tech Mahindra,


What are the Static and Dynamic Variables? Differentiate them.

0 Answers   CGI,


Can we restart a dead thread in java?

0 Answers  


Hi friends i want display Triangle shap stars(*) please can tell me any one java code logic? * *** ***** ******* Like this

2 Answers   NIIT, TCS,


What is the purpose of the wait(), notify(), and notifyall() methods in java programming?

0 Answers  


What do you mean by inner class in java? Explain

0 Answers  


What are the types of collections in java?

0 Answers  


What will happen when using pass by reference in java?

0 Answers   HCL,


What do you understand by weak reference?

0 Answers  


Difference between string, string builder, and string buffer?

0 Answers  


Categories