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...

Difference between String & StringBuffer

Answer Posted / srikanth reddy

-->String objects are constants and immutable where as
StringBuffer objects are mutable
-----------------------------------------
-->in string class we can create object by two ways
1)using new operator --> string s = new String("Java");

2)without new operator --> String s2="raju";

------------------------------------------
-->in string class there string constant pooling technique
but in stringbuffer there is no facility
-------------------------------------------
all the methods in stringbuufer class is synchorined so
thread safe but not in string class

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is meant by encapsulation?

1083


Can we create constructor in abstract class ?

1059


Can we override private constructor in java?

977


What programs use java?

959


What is java in simple terms?

999


Explain reverse a linked list iterative solution in java?

925


What is a generic data type?

1040


What is tree node in java?

962


What is data type in java?

904


When do we need to use internal iteration? When do we need to use external iteration?

1125


How does system arraycopy work in java?

1126


What are basic data types?

1095


how to deploy tomcatserver to weblogic server? write d following steps?

1967


What is ‘has a’’ relationship in java?

1221


What is meant by method overriding?

1111