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 difference between static and abstract class?
Explain java coding standards for classes or java coding conventions for classes?
Explain the importance of import keyword in java?
Where is singleton pattern used?
What is java util list?
Explain which of the following methods releases the lock when yield(), join(),sleep(),wait(),notify(), notifyall() methods are executed?
Why set is used in java?
I am a fresher and know core java, c languge, html, css etc if I am illegible for any job then send it on my email tatranakshay276@gmail.com
Define linked list and its features with signature?
What are the advantages and disadvantages of object cloning?
What occurs when an object is constructed?
How do you sort objects in java?
what is the role of xml in core java?? and how we can use it?? can somebody give a sample program with explanation and from where i can read more about xml?????
What is the use of put method?
What is java used for?