answersLogoWhite

0

In Java, String is a class that represents an immutable string, that is a sequence of characters that can never change. Any modification to the String will have to create a new String object. A StringBuffer (and in Java 1.5 and up, a StringBuilder) is a mutable string object that can be modified at runtime.

The advantages of using Strings are that the String is generally lighter and faster to use where the String isn't going to change. When building a long String of text by making changes to one object over time, you should use a StringBuilder or StringBuffer (in Java 1.4 or when synchronization is important).

User Avatar

Wiki User

17y ago

What else can I help you with?

Related Questions

What is the difference between a buffer and an indicator?

Distinguish between buffer and indicator


What is the difference among string and string buffer and string builder?

String is the immutable class that means the object f that class never be changed. String is the Sequence of character.


What are the difference between buffer stock and safety stock?

no difference


What is the difference between n and endl in c plus plus?

The \n escape sequence simply inserts a newline within a string. std:endl does the same but also flushes the write buffer.


What is difference between inverter and buffer?

if you connect Nmos and Pmos other way around then it act as buffer


Difference between character and string?

A string ends with a '\0' character,but character is not.


What is the difference between TAE buffer and TE buffer?

The main difference is in composition. In TE common Tris buffer is bring down to pH 8 with HCl and EDTA is involved but in TAE instead of Tris HCl in TE Tris-acetate buffer is used.


What is the difference between Basel II and Basel III?

There is a main difference between Basel II and Basel III. In Basel III, there is a 4.5% capital buffer to absorb shock. With Basel II, there is no capital buffer.


What is the difference between rope and string?

The difference between thread rope and string is that thread is more thicker than string and that string is more thinner than rope and thread is more thinner than rope there's your answer geese


Whats The difference between a 6 and 7 string guitar?

There is practically no difference. The 7-string guitar has one lower string that the 6-string does not. It is usually tuned to B(natural).


Is there a difference between leather and string when weaving?

yes


What is the difference between tbs buffer-tbst buffer and corresponding function of them?

Tween 20. In TBST you add 0.05-0.1/ Tween 20.