When you print an object with System.out.println(myCar), Java calls the object's toString() method. By default, this returns something like Car@1a2b3c, which is the class name and a hash code. Not helpful.
You can override toString() to return something readable:
class Car {
String color;
int speed;
public String toString() {
return color + " car going " + speed + " mph";
}
}
Now System.out.println(myCar) prints red car going 60 mph. This is especially useful for debugging. Without a custom toString(), you'd have to print each field separately every time you want to inspect an object.