how to make object print using [] java code example Example: print object java System.out.println(myObject); // invokes myObject.toString()