title: using equals method in same class without overriding
body: <p>Is it possible to compare 2 objects of same class without overriding equals method.. ?
  If yes, please let me know how.. ?
  According to me, it is not possible to compare variables of 2 different objects of same class without overriding because object contains memory address and not the variable value.</p>
  
  <pre><code>class A {
  int x;
  A(int x) {
  this.x=x; }
  }
  
  
  A a1=new A(5);
  A a2=new A(4);
  </code></pre>
  
  <p>Can we compare a1 &amp; a2 using equals method and without overriding it.. ? Also the value should be compared not the address at a1 &amp; a2...</p>