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 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between overriding and overloading in java?

1076


Write a program in java to establish a connection between client and server?

972


What's the base class in java from which all classes are derived?

1273


Can singleton class be inherited in java?

1008


Can we make constructors static?

1240


Can classes declared using the abstract keyword cab be instantiated?

1051


What is lazy initialization in java?

1017


What is generic class?

1097


Why there is no call by reference in java?

929


What is meant by class loader? How many types are there? When will we use them?

973


What is the difference between integer parseint and integer valueof?

1006


Can we nested try statements in java?

1107


What is canonical name in java?

1151


What is difference between arraylist and list in java?

1094


Does list allow duplicates in java?

937