 <p>Object (the class from which all java objects ultimately inherit) defines it's own toString() method. Therefore, if you don't override the toString() method in your class, then it will use the one defined in Object() (or any intermediate classes between your class and Object).</p> <p>This is why, if you don't define a toString() method, you don't get an error from javac.</p> <p>This usually results in a String like</p> <pre><code>System.out.println("o=" + new Object().toString()) o=java.lang.Object@1176e5f </code></pre>