Computer Science, asked by khatwanisheetal6673, 9 months ago

differentiate between string and stringbuffer class in Java???​

Answers

Answered by Soninidhi
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