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
Why use string handling in Java?
What do you mean by default constructor in java?
Can we declare a class as static?
What does ide stand for?
Using callable statement how can you pass out parameters, explain with example?
Can we declare a static variable inside a method?
Can a class have multiple superclasses?
Write a program to search a number in the given list of numbers.
What is binary search in java?
What is array length?
What are operators and its types?
what is the difference between thread and runnable types? : Java thread
What is an example of character?
What is javac in java?
how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? : Java thread