public String toString()
String xyz = object.toString();
So code your calls to print an object like this:
System.out.println(object);