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 / debapriya maity

The first one is faster

Second code snippets:3 objects are created

1:s = "Hello Mom"
2:,I mean Mom
3:Hello Mom,I mean Mom

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the purpose of using rmisecuritymanager in rmi?

972


Define immutable object?

1066


Why is a constant variable important?

961


What is finalize() function in java?

1020


Why hashmap is used in java?

1096


What is difference between == and === in js?

1012


How many inner classes can a class have?

1045


What is tostring () method?

1035


Which non-unicode letter characters may be used as the first character of an identifier?

1007


What is package protected in java?

992


What is json parser in java?

1062


What two classes are used to read data only?

1101


How do you use parseint in java?

986


What do you mean by constructor?

983


What is the use of toarray () in java?

1071