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
Explain the scope or life time of class variables or static variables?
Are floats faster than doubles?
What is default constructors?
What is a list in java?
What is a jagged array in java?
What is an image buffer?
why Java does not support multiple inheritances?
When will we use them?
What is an immutable class? How to create an immutable class?
What is square root in java?
What is the benefit of singleton pattern?
What is the purpose of a volatile variable?
What is the statements?
What is enhanced loop in java?
What is a condition in programming?