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 and String Buffer?

Answers were Sorted based on User's Feedback



Difference between String and String Buffer?..

Answer / janet

1. String objects are constants and immutable where as
StringBuffer objects are not.
2.String class supports constant strings where as
StringBuffer class supports growable and modifiable strings.

Is This Answer Correct ?    13 Yes 0 No

Difference between String and String Buffer?..

Answer / sumati

String is immutable
String buffer is mutable

Ex String str = "abc";
str = "new String";
this will creat new memory location and stores "new String"

but in String buffer
StringBuffer strBuf = "abc";
strBuf = "new String"

it will overwrite in same memory location

Is This Answer Correct ?    13 Yes 0 No

Difference between String and String Buffer?..

Answer / ravikiran(aptech mumbai)

string is immutable
string buffer is mutable

Is This Answer Correct ?    7 Yes 0 No

Post New Answer

More Core Java Interview Questions

What if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?

0 Answers  


Name the class that used to read objects directly from a stream?

4 Answers   Wipro,


What is the difference between this() and super() in java?

0 Answers  


3) Suppose you are a very rich person, having 50 rooms and you have lost the key for one of the room's. How effectively you can find this key? (Qs2 and Qs3 are related)

3 Answers   RBS,


What is the purpose of object oriented programming?

0 Answers  


What is lambda programming?

0 Answers  


which class is the wait() method defined in? : Java thread

0 Answers  


Why should we use singleton pattern instead of static class?

0 Answers  


What is java util concurrentmodificationexception?

0 Answers  


what is the use of private constructor in core java?

3 Answers   OnMobile, Satyam, Yash Technologies,


why use interface? if interface declear a method implement in class. why direct implement method in class

1 Answers   HCL,


Why only one Class is public in one file? Explain in details. Thanks in Advance.

12 Answers  


Categories