title: Built in function for Different Super class objects
body: <p>I want to compare the super classes of two different objects.If it is same then it should ask for another opponnet. Unless it selects the type that is diffenret. I have the following code for it. But it always returns true.</p>
  <pre><code>boolean equal(Characters C)
  {
      return (C.getClass().getSuperclass()== Char.getClass().getSuperclass());
  }
       
        
  </code></pre>