Is it possible to compare two different Classes in java?
<p>I have two classes Class1 and Class2, 
      Class1 obj;
      Class2 obj1;
    How can I compare obj is instance of Class2 ?
    I am not able to use instanceOf operator for these classes, It is giving compilation    error "cant't compare incompatiable types"</p>
