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 / parameswaran m
The StringBuilder one is slightly more efficient and uses
less memory. In practice, it is unlikely to make enough of a
difference to matter either way.
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
os is developed in c no java is more secured then c na why dont the os developed is developed using java
What is the base class in java from which all classes are derived?
Does the order of public and static declaration matter in main method?
Is intellij better than eclipse?
What is dynamic binding(late binding)?
Garbage collection in java?
What checkbox method allows you to tell if a checkbox is checked?
What are the two types of java?
Can constructor return value?
What is the base class for error and exception?
What is math floor in java?
What is a stringbuffer?
What are the 3 types of control structures?
What is unicode in java?
Tell me about your ability to work under pressure