What is the difference between a StringBuilder and a StringBuffer in Java?
A. A StringBuilder is mutable, while a StringBuffer is immutable.
B. A StringBuilder is not thread-safe, while a StringBuffer is thread-safe.
C. A StringBuilder has a larger capacity than a StringBuffer.
D. None of the above.
Answer:B
What is the difference between a StringBuilder and a StringBuffer in Java?
A. A StringBuilder is mutable, while a StringBuffer is immutable. B. A StringBuilder is not thread-safe, while a StringBuffer is thread-safe. C. A StringBuilder has a larger capacity than a StringBuffer. D. None of the above.