Difference between String and String Buffer?
Answers were Sorted based on User's Feedback
Answer / janet
1. String objects are constants and immutable where as
StringBuffer objects are not.
2.String class supports constant strings where as
StringBuffer class supports growable and modifiable strings.
| Is This Answer Correct ? | 13 Yes | 0 No |
Answer / sumati
String is immutable
String buffer is mutable
Ex String str = "abc";
str = "new String";
this will creat new memory location and stores "new String"
but in String buffer
StringBuffer strBuf = "abc";
strBuf = "new String"
it will overwrite in same memory location
| Is This Answer Correct ? | 13 Yes | 0 No |
Answer / ravikiran(aptech mumbai)
string is immutable
string buffer is mutable
| Is This Answer Correct ? | 7 Yes | 0 No |
Explain what are final variable in java?
What is the function of http?
What is a copy constructor in java?
Can you achieve runtime polymorphism by data members?
What is the main use of generics in java?
How to use scanner in java?
What is a Java switch statement, and how can it be used?
What is constant in programming?
Difference between Reader/Writer and InputStream/Output Stream?
9 Answers Adobe, Kirusa, Verizon,
what is mean by ooad? where we are using? can you tell me any real time example?
what do you mean by classloader?
is java support call by reference and call by value, if supports please explain?