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