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

if the memory capacity is 700 presently occupied by process is 690. then another process request space(40) how this situation handled in java.

4 Answers   Wipro,


describe method overloading

1 Answers  


Can we force garbage collector to run ?

1 Answers   B-Ways TecnoSoft,


Can we override private method?

1 Answers  


What is the difference between scrollbar and scrollpane?

1 Answers  


What is java thread dump, how can we get java thread dump of a program?

1 Answers  


What is use of inner class in java?

1 Answers  


in a console we r giving java <class name> if r pressing enter where it'll goes

2 Answers   CSC,


diff. b/w JAVA and javascript...

3 Answers   NIIT,


What do you mean by boolean?

1 Answers  


Can a serialized object be transferred via network?

1 Answers  


What are format specifiers in java?

1 Answers  


Categories