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 comes to mind when someone mentions a shallow copy in java?

1110


What are the problems faced by java programmers who don't use layout managers?

980


Can inner class extend any class?

1059


How can we avoid including a header more than once?

1040


What is the best way to findout the time/memory consuming process?

1032


What is difference between classpath and path variables in java?

1200


What are thread priorities and importance of thread priorities in java?

1139


Write a java program to count the number of words present in a string?

985


Discuss different types of errors that generally occur while programming.

1040


Difference between static binding and dynamic binding?

1114


Why use string handling in Java?

1032


What is the major difference between linkedlist and arraylist?

1044


How many types of gc are there in java?

997


What is byte value?

997


What will happen if there is a default method conflict as mentioned above and we have specified the same signature method in the base class instead of overriding in the existing class ?

967