If you don't define toString() it will be inherited from Object, that defines it asgetClass().getName() + '@' + Integer.toHexString(hashCode())
That's more along the lines of what I was looking for, thanks. By the way, is that Integer.toHexString(hashCode()) supposed to be the object's location in the heap?
Andy747 mentioned that it saves your program from crashing, but shouldn't that be a compile-time error anyway? If I'm trying to convert an object to a string, and toString() isn't explicitly overridden, doesn't that imply that I made a typo, and I don't actually want to convert the object itself into a string?
I'm sure there's a good reason why it does this, so that's why I'm asking.