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
What is hashmap in java?
How does map works in java?
What is command line argument in java?
What is an off by one error in java?
Difference between serialization and deserialization in java?
What is the functionability stubs and skeletons?
What does java se mean?
What is arrays fill in java?
What is the difference between interface & abstract class?
What is a prefix function.write down a code to compute prefix function.
Difference between static binding and dynamic binding?
When do we use hashset over treeset?
What is the difference between a synchronized method and a synchronized block?
What are loops in java?
Can we inherit a class with private constructor?