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

StringBuilder s = new StringBuilder("Hello
Mom");s.append(",I mean,Mother");
Response.Write(s.ToString());


String s = "Hello Mom";
s+ = ",I mean Mom";
Response.Write(s);

Which is faster ? which uses the most memory?

Answer Posted / parameswaran m

The StringBuilder one is slightly more efficient and uses
less memory. In practice, it is unlikely to make enough of a
difference to matter either way.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is enhanced loop in java?

975


Does java allow default arguments?

973


What is the scope or life time of instance variables?

1084


What is difference between printf and scanf?

1113


What does a boolean method return?

1205


What is bifunction in java?

1165


What is command line argument in java?

1132


Can a class be protected in java?

947


What are the rules for variable declaration?

945


Can a class be defined inside an interface?

1013


Explain the advantages of packages in java?

894


What is google full form?

986


What is the difference between an inner class and a sub-class?

985


What is arraylist e in java?

1039


What is the purpose of the wait(), notify(), and notifyall() methods in java programming?

1055