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

How does indexof work?

731


what is the constructor and how many types of constructors are used in java?

765


What are register variables what are the advantages?

701


What does split function do in java?

764


Can we change the value of static variable?

719


Can we have multiple classes in single file ?

830


Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).

1831


How do you find the independent variable?

749


Write a code to show a static variable?

849


What is the difference between java applets and applications?

858


What is variable and example?

736


How many bytes are there?

759


What is fail first in java?

830


What are the important methods of java exception class?

761


What is the use of flag?

861