Not able to compare objects in Java string getting appended to classname
<p>I am comparing two objects in Java and have implemented equals and hashcode.</p>

<p>Though the objects are equal the comparison returns false.</p>

<p>I found that in the equals implementation it's printing the class of the two objects as different although they are same.</p>

<p>For one it prints: <code>com.salebuild.model.TechnologyProduct</code><br>
While for the other it prints: <code>com.salebuild.model.TechnologyProduct_$$_javassist_71</code></p>

<p>So it fails in this condition in the equals method:</p>

<pre><code>if (getClass() != obj.getClass())
{
    return false;
}
</code></pre>

<p>Unable to find why it's appending this string: <code>_$$_javassist_71</code></p>

<p>How can I overcome this? Could anyone suggest?</p>
