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...

which class to use when concatenating
strings in a loop.

Answer Posted / narasimha

we any use the both classes String and StringBuffer.
but if we use StringBuffer it would be advatagebecase we
are going to create only one Object.if we use the String
class it is going to create the one for each itration.now
it up to you which one to use

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is compiler and what its output.

1143


Can we override private method in java?

1082


Can we restart a thread already started in java?

1095


What is autoboxing and unboxing?

989


Is it compulsory for a try block to be followed by a catch block in java for exception handling?

1003


How do you identify independent and dependent variables?

1003


What do you mean by default constructor in java?

1059


What are the pillars of java?

914


What is files manifesting?

2196


What are static methods?

1040


How do you sort in descending order in java using collections sort?

883


What kind of variables a class can consist of?

1096


How do you invoke a method?

996


What is your platform’s default character encoding?

1077


How to change value in arraylist java?

1161