What is the difference between StringBuilder and StringBuffer in Java?
StringBuilder is faster because it is not synchronized, while StringBuffer is slower but thread-safe because it is synchronized.
Well done! Youâ€™ve got the distinction between StringBuilder and StringBuffer exactly right.
Can you give an example of a situation where you would use StringBuffer over StringBuilder?