Equals(Obj) Testing
<p>I'm testing to see if the the two objects are equal yet it returns false. Could someone explain to me why this is happening? Thanks.</p>

<pre><code> public boolean equals(Object obj) {
  if(obj instanceof SparsePolynomial)
  {
   return true;
  }
     return false;
 }

@Test
public void testEqualsObj()
{
    ArrayList&lt;Integer&gt; k = new ArrayList&lt;Integer&gt;();
    k.add(1);
    k.add(3);
    SparsePolynomial d = new SparsePolynomial(k);
    ArrayList&lt;Integer&gt; k2 = new ArrayList&lt;Integer&gt;();
    k.add(1);
    k.add(3);
    SparsePolynomial d2 = new SparsePolynomial(k2);
    Assert.assertTrue(d.equals(d2));
}
</code></pre>
