Difference between the String and StringBuffer classes?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of sizeof operator?

508


Is arraylist dynamic in java?

503


What happens if we override only equals?

554


How to remove the trailing spaces from a string?

616


Is call by reference possible in java?

516






Write a program to show whether a graph is a tree or not using adjacency matrix.

568


What is a line break?

558


What is not object oriented programming?

480


Explain implementation and how is it different from conversion?

565


What are the four pillars of java?

569


What is meant by bytecode?

555


Explain thread life cycle in java?

566


What is difference between public static and void?

459


What is a variable in java?

506


What are namespaces in java?

499