what is difference between String buffer and String builder?
Answer Posted / subhareddy
There is no much difference between string buffer and string
builder.only thing is all the methods available in string
buffer class are synchronized methods.and the method
available in string builder class are non-synchronized methods.
If we want thread safety then we have to go for string
buffer ,but performance goes down.if we don't want thread
safety the we can go for string builder
| Is This Answer Correct ? | 14 Yes | 1 No |
Post New Answer View All Answers
what is the purpose of the wait(), notify(), and notifyall() methods? : Java thread
Explain different forms of polymorphism?
What is a finally block? Is there a case when finally will not execute?
Is integer immutable in java?
What is null mean in java?
What is n in java?
What is the difference between break and continue statements?
What is parseint?
Explain listiterator and methods in listiterator?
Explain about member inner classes?
Differentiate between the constructors and methods in java?
Can a hashset contain duplicates java?
what do you mean by marker interface in java?
which class is the wait() method defined in? : Java thread
Can a set contain duplicates?