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