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

What is a void method java?

906


Can we define a package statement after the import statement in java?

1014


Which number is denoted by leading zero in java?

1192


What is a vararg?

959


How do you join strings in java?

975


Difference between overriding and overloading in java?

1005


What is object english?

1001


What are anonymous inner classes?

960


What is runtime locatable code?

1357


What is an empty list in java?

915


What is the purpose of main function in java?

965


Why unicode is important?

890


What is an iterator java?

1001


What is tochararray in java?

876


What is the main use of generics in java?

914