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
5 Coding best practices you learned in java?
Why is singleton class used?
Will the jvm load the package twice at runtime?
What is meant by design patterns?
Explain tree set and its features?
Define inheritance with reference to java.
How finally used under exception handling?
Explain when noclassdeffounderror will be raised ?
What are the benefits of java?
What is the common usage of serialization? What exceptions occur during serialization?
How many characters is 2 bytes?
What is implicit object in java?
Can static methods access instance variables in java?
What is temp in java?
What does this mean java?