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

Explain what are final variable in java?

0 Answers  


What is the function of http?

0 Answers  


What is a copy constructor in java?

0 Answers   Amazon,


Can you achieve runtime polymorphism by data members?

0 Answers  


What is the main use of generics in java?

0 Answers  


How to use scanner in java?

1 Answers  


What is a Java switch statement, and how can it be used?

2 Answers  


What is constant in programming?

0 Answers  


Difference between Reader/Writer and InputStream/Output Stream?

9 Answers   Adobe, Kirusa, Verizon,


what is mean by ooad? where we are using? can you tell me any real time example?

1 Answers   Eka Software,


what do you mean by classloader?

0 Answers  


is java support call by reference and call by value, if supports please explain?

5 Answers  


Categories