title: how to check reference equality in an object which implements content equality?
body: <p>...in other words:
  let's suppose I have 2 Strings declared as so:</p>
  
  <pre><code>String one = new String("yay!");
  String two = new String("yay!");
  </code></pre>
  
  <p>these two Strings are two different objects, but if I run</p>
  
  <pre><code>if(one.equals(two))
     System.out.println("equals() returns true.");
  </code></pre>
  
  <p>I get "equals() returns true".
  This is because the String class overrides the equals() method to implement a content level equality.
  However, I need to access a reference level equality (like the one implemented in Object) to distinguish the object one form the object two.
  How can I do that?</p>
  
  <p>I tried this:</p>
  
  <pre><code>one.getClass().getSuperclass().equals();
  </code></pre>
  
  <p>to try to invoke the Object equals() method of the String one but it didn't work.</p>
  
  <p>Any advice?</p>