differentiate between string and stringbuffer class in Java???
Answers
Answered by
1
String object is immutable i.e. it's object can't be reassigned again whereas, the object of StringBuffer is mutable. String object is slower in performance whereas, the StringBuffer object is faster. String object consumes more memory whereas, StringBuffer objects consumes less memory.
Similar questions
Math,
4 months ago
Physics,
4 months ago
English,
9 months ago
India Languages,
9 months ago
Math,
1 year ago