what is difference between String buffer and String builder?
Answer Posted / rajujohn
hi All
Both are mutable ,that means we can change value of the
instance variable using append,insert and ...
But only one difference when you go for the multi-thread
concept you use StringBuffer,Because it is thread safe ,that
means, if one thread access this stringbuffer variable on
the time another thread cant access this stringbuffer,so
stringbuffer is slowest performance compare to stringbuilder.
by raju.j
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Does every java program need a main?
What exceptions occur during serialization?
What is nested loop? What is dangling else condition in it?
Is string is a keyword in java?
Is final static java?
What is a flag variable?
Why string is a class?
Is zero a positive integer?
What is the string function?
Define how does a try statement determine which catch clause should be used to handle an exception?
How to convert string to char and vice versa?
What do you understand by private, protected and public?
What are the features of junit?
What is object-oriented paradigm?
What is navigable map in java?