O'Reilly logo
  • Tansu Dasli thinks this is interesting:

public String toString() {

From

Cover of Java® 9 for Programmers, Fourth Edition

Note

return getClass().getName() + "[" +
//other attributes
+ "]";

that's much better