Difference String and String Buffer

Answer Posted / kanchan

String are read only and immutable. The StringBuffer class
is used to represent characters that can be modified.
StringBuffer is faster than String when performing simple
concatenations.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the list interface?

838


Why does java not allow multiple public classes in a java file ?

3910


Why are the destructors for base class and derived class called in reverse order when the program exits

1929


What is the technique adopted to create an immutable class?

772


What is == in java?

764


What causes memory leaks in java?

670


How can we make copy of a java object?

774


What is the collections api?

778


What is the final keyword denotes?

866


Differentiate between run time error and syntax error.

812


How do you add an element to a hashset in java?

691


Explain a few methods of overloading best practices in java?

736


What is the difference between the prefix and postfix forms of the ++ operator?

779


What is the difference between a break statement and a continue statement?

802


What is the purpose of the file class in java programming?

741