Answer Posted / 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 |
Post New Answer View All Answers
Explain JMS in detail.
What are advantages of exception handling in java?
How do you use compareto in java?
How can we make a class singleton?
How is hashcode calculated in java?
What access modifiers can be used for variables?
How much ram can a 64 bit processor theoretically?
Can we create constructor in abstract class ?
What are static initalizers in java ?
What is a copy constructor in java?
What are the different types of collections in java?
Explain the difference between transient and volatile in java?
Can we have any other return type than void for main method?
Why object class is super class for every class in java?
What is difference between word and integer?