What is the output of the following?
12: StringBuilder b = new StringBuilder("12"); 13: b = b.append("3"); 14: b.reverse(); 15: System.out.println(b.toString());
C.
On line 12, the value of the StringBuilder is 12. On line 13, it becomes 123.
Since StringBuilder is mutable, storing the result in the same reference is redundant.
Then on line 14, the value is reversed, giving us 321 and making Option C correct.