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 hash table in java?
a thread is runnable, how does that work? : Java thread
From the two, which would be easier to write: synchronization code for ten threads or two threads?
What is the difference between post and put?
What is java full form?
Can we modify the throws clause of the superclass method while overriding it in the subclass?
Is upper case in java?
What is the difference between break and continue statements?
What is the return type of the main method?
What is equals method in java?
Explain the importance of import keyword in java?
How do you escape a string?
What does += mean coding?
Does importing a package imports its sub-packages as well in java?
How do you define a parameter?