A StringBuffer is slower than a StringBuilder, but a StringBuffer is thread-safe.
Click to view the answer
A.
The StringBuilder class is compatible with StringBuffer but is not thread-safe and is generally faster.