Which of the following creates a StringBuilder with a different value than the other options?
StringBuilder()
.append("clown")D.
This question is testing whether you understand how method chaining works.
Option A creates an empty StringBuilder and then adds the five characters in clown to it.
Option B simply creates the clown when calling the constructor.
Option C creates the same value, just in two parts.
Option D is correct.