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
What do you understand by java?
What is the differences between c++ and java? Explain
What is the difference between java applets and applications?
How do you create a sop?
What is a variable and constant?
Is java se open source?
What is stack explain?
Why do I need to declare the type of a variable in java?
what invokes a threads run() method? : Java thread
What is return keyword in java?
Will the jvm load the package twice at runtime?
What is the difference between superclass and subclass?
What is the disadvantage of java?
What is difference between static variable and global variable?
What is the dot operator?