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
How do you start a thread?
Can we force garbage collector to run ?
Why arraylist is used in java?
Is null a string in java?
Do we need to manually write Copy Constructor?
What is the numeric promotion?
Are arrays passed by reference in java?
Tell us something about different types of casting?
Can inner class be public in java?
What is the main advantage of passing argument by reference?
List the different types of classloaders in java.
Can we overload run() method in java?
Explain about the dynamic behavior of core java?
What is the exact difference in between Unicast and Multicast object?
what is synchronization and why is it important? : Java thread