Differentiate between StringBuffer and StringBuilder in Java programming.
Answers
Answered by
1
StringBuffer
1) StringBuffer is synchronized i.e. thread safe. It means two threads can't call the methods of StringBuffer simultaneously.
2) StringBuffer is less efficient than StringBuilder.
StringBuilder
1) StringBuilder is non-synchronized i.e. not thread safe. It means two threads can call the methods of StringBuilder simultaneously.
2) StringBuilder is more efficient than StringBuffer.
HOPE THIS HELPS U
Anonymous:
i know u erika
Similar questions