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

Is an object null?

1034


What is static and final keyword in java?

1077


Can we have any code between try and finally blocks?

1077


Difference between current previous versions of Java?

1081


What is thread start?

1018


Which collection allows duplicate values in java?

1030


Can a private method be declared as static?

1068


Are arrays immutable in java?

1154


Is map ordered in java?

998


How to make a write-only class in java?

1106


What is used of static keyword in java?

1147


If I don't provide any arguments on the command line, then what will the value stored in the string array passed into the main() method, empty or null?

1297


How we can run a jar file through command prompt in java?

1021


What is the numeric promotion?

1099


What is continuity of a function?

1137