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 main difference between string and stringbuffer?
can you explain it with program?

Answer Posted / divya

String class is used to manipulate character strings that
cannot be changed.Simply stated,objects of the String are
read only and immutable.

StringBuffer class is used to represent characters that can
be modified.

Ex:Sting str=new String("core");
str +="Java";

StringBuffer str=new StringBuffer("core");
str.append("Java");

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is arraylist zero based?

1066


What is integer valueof?

1109


What is assembly language?

981


What is the advantage of functional interface in java 8?

994


What are anonymous inner classes?

1010


What is the internal implementation of set in java?

929


what is meant by encapsulation?

1083


Explain thread life cycle in java?

1037


What is javac used for?

937


What is flag in java?

992


Which container method is used to cause a container to be laid out and redisplayed in java programming?

1109


What is a dot notation?

1033


Does java have extension methods?

977


What does it mean that strings are immutable?

1128


Define locale.

1038