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 the differnence between String Buffer and String
builder despite having knowledge that String builder is
faster than String Buffer and last one is threadsafe.please
tell another important difference.

Answer Posted / sanjay

WHEN AN APPLICATION NEEDS TO BE RUN ONLY BY SINGLE THREAD
IT IS BETTER TO USE STRING BUILDER BECAUSE IT IS
UNSYNCHRONIZED

WHEN AN APPLICATION NEEDS TO BE RUN BY MULTIPLE THREADS IT
IS BETTER TO USE STRING BUFFER BECAUSE IT IS SYNCHRONIZED

Is This Answer Correct ?    9 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we declare the static variables and methods in an abstract class?

1031


What is role of void keyword in declaring functions?

1096


How do I print a “?

1053


Can we declare a constructor as final?

1396


What is meant by distributed application? Why are we using that in our application?

989


What is use of functional interface in java 8? Explain

1089


What are the advantages and disadvantages of object cloning?

1163


Is java type safe?

1004


What is the difference between private & public & friendly classes?

1112


How does java pattern compile work?

1020


What does flagged out mean?

1119


Can java list be null?

1038


Is 64bit faster than 32 bit?

1123


Is the empty set a singleton?

1028


How to implement a multithreaded applet?

2730