DRAFT
ToStringPrints
Incorrect
Invoking toString() prints something
Correct
Invoking toString() does not produce any output
CorrectionHere is what's right.
Here is what's right.
The toString()
method does not cause any output. It simply returns a String
.
This is related to a more general misunderstanding of “outputting” and “returning values”.
Language
Java