title: Do two equal objects have to have the same toString output?
body: <p>Do two equal objects have to have the same toString output?</p>
  
  <p>In code, does the following have to hold in general?</p>
  
  <pre><code>if(o1.equals(o2))
    return o1.toString().equals(o2.toString()) // always true?
  </code></pre>
  
  <p>I am asking because I have just written a <code>toString</code> method for which the above statement does <em>not</em> hold. I could not find any hint at the documentation, but I want to get sure my <code>toString</code> method does not break any contract rules.</p>