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 / ravi jain

First one is faster

because in 1st only one object is created,
but in 2nd one three objects are created.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is daemon thread and which method is used to create the daemon thread? : Java thread

905


What does += mean coding?

883


What are desktop procedures?

999


Why we use methods in java?

939


Why method overriding is used?

1020


What is anagram of a string?

887


Give example to differentiate between call by value and call by reference.

971


What are the six ways to use this keyword?

1008


What is the purpose of a default constructor?

1035


Can a top level class be private or protected?

997


Can we create object of static class?

970


Is empty string in java?

1094


what are the high-level thread states? : Java thread

949


What is vector capacity in java?

1035


What is general methodology?

980