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
What are heterogeneous objects?
What is set and get methods in java?
What does flag mean in java?
What does sizeof return?
What is overloading and overriding in java?
What data type is true or false?
What are variable arguments or varargs?
Is null == null in java?
Which class cannot be a subclass in java?
design an lru cache in java?
Explain the concept of hashtables?
String class is defined under which package in java?
What are the legal operands of the instanceof operator?
What are the major drawbacks of external iteration?
What is JFC?