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
Is map ordered in java?
What is binary tree in java?
What comes to mind when someone mentions a shallow copy in java?
What is anti pattern in cyber security?
What two classes are used to read data only?
What is protected in java?
What are the types of collections in java?
What is the base class of all classes?
How can a gui component handle its own events?
What is the byte order of byte buffer?
Can we convert stringbuilder to string in java?
what are the states associated in the thread? : Java thread
When will you define a method as static in Java?
How do you override a private method in java?
What is hash table in java?