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 / vinodkumar uttara student

StringBuilder all methods are not synchronized , nothing
changes done in this class , it is same as StringBuffer.I
mean to say , more than one thread can be execute
StringBuilder object , because there is not a concept of
lock on object , any thread can execute on this object.Where
as StringBuffer class all methods are synchronized only one
thread at time can access synchronized method , because it
get lock on object.

Please help me , if i am right?
is it correct,
thanks for the reply

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can string be considered as a keyword?

989


What is data movement?

1066


Can we have more than one package statement in the source file?

1020


What are scriptlets?

1028


Who developed java?

936


What are three types of loops in java?

1050


Name few "optional" classes introduced with java 8 ?

1067


Explain the importance of thread scheduler in java?

952


Is it necessary that each try block must be followed by a catch block?

971


What is binary tree in java?

1004


If try block is successfully executed, Then Is Finally block executed?

1037


Is there a case when finally will not execute?

942


What is the final variable?

1168


What is the exact difference in between Unicast and Multicast object?

2042


How to perform quicksort in java?

1033