Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Does every java program need a main?

988


What exceptions occur during serialization?

1082


What is nested loop? What is dangling else condition in it?

1067


Is string is a keyword in java?

967


Is final static java?

1002


What is a flag variable?

965


Why string is a class?

931


Is zero a positive integer?

1057


What is the string function?

950


Define how does a try statement determine which catch clause should be used to handle an exception?

1148


How to convert string to char and vice versa?

993


What do you understand by private, protected and public?

1037


What are the features of junit?

1039


What is object-oriented paradigm?

1059


What is navigable map in java?

976