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 |
What is multiple inheritance? Is it supported by java?
whar are the draw backs of programming lang step by step in Clang and next in C++ and next and in Java nad in .Net
when to use ArrayList and when to use HashMap in webApplication.
what is the use of bean managed and container managed with example?
Where we write javascript code in html page?
How do I run java on windows?
What is the difference between a vector & an array list?
what are the methods of an object class?
Howto get an object that will perform date & time calculations then format it for output in some different locales with different date style.can ne1 tel me the answer of this question.pls
Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)
What is the purpose of encapsulation?
What is == in java?