There are following difference among String, StringBuilder and StringBuffer:
String is immutable, if you try to edit/modify their values then new object gets created always, whereas StringBuffer and StringBuilder are mutable so they can change their values.
StringBuffer's all methods are synchronised, but StringBuilder's all methods are not synchronised.
StringBuilder gives us better performance rather than StringBuffer. Because, synchronised having locs.
Difference between StringBuffer and StringBuilder:
StringBuffer is thread-safe. StringBuilder is not thread-safe.