how to print objects in java code example Example: print object java Click to copySystem.out.println(myObject); // invokes myObject.toString()