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 diff string and stringbuffer

Answer Posted / sudheer babu

Both string and string buffer are different ,in the case of
the String it can ready only and immutable where as the
String Buffer is the modifier and mutable.
EX:
String s1="abc";
S.o.p(s1);---------->o/p is abc
StringBuffer sb=new StringBuffer("abc");
s.o.p(sb);---------->o/p is abc
here we can modify the String buffer values if we want i.e
sb.append("z");
s.o.p(sb);----------->0/p is abcz

"this is the basic difference between the String and String
Buffer."

Is This Answer Correct ?    8 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is deque in the java collections framework? : java collections

1016


What are maps interfaces in the java collections? : java collections

995


What are the different types of classes implemented in the set interfaces? : java collections

1008


What are the uses of the set interfaces in the java collections? : java collections

926


What is the enumerator of the java collection framework? : java collections

985


What are the main classes of the list interfaces? : java collections

978


What is the use of the list interface in the java collection? : java collections

977


What is an algorithm in java collection framework? : java collections

1006


Which sorting algorithm is used by collections.sort() in java ?

874


What are the interfaces in java collections? : java collections

1078


What are the different types of ways where you can iterate over a list? : java collections

950


Which interface does java.util.hashtable implement?

1134


please mail me the interview question based on java/j2ee

1899


What is the use of hashcode in java ?

1054


What are the different types of collections views being provided by the map interface? : java collections

978