title: Java name clash error
body: <p>I have a superclass which implements the <code>Comparable</code> Interface and overrides the <code>compareTo()</code> method. One subclass of this superclass has to implement it's own <code>compareTo()</code> method but I'm not able to override the <code>compareTo()</code> method of the superclass due to the name clash error.</p>
  
  <pre><code>public abstract class Superclass&lt;T&gt; implements Comparable&lt;T&gt; {
      public int compareTo(T bo) { };
  }
  public class Subclass extends Superclass&lt;Subclass&gt; {
      public &lt;T&gt; int compareTo(T bo) { }; // I get the name clash error here
  }
  </code></pre>
  
  <p>To solve this problem I tried to make the subclass generic too (see: <a href="https://stackoverflow.com/questions/2543955/java-generics-name-clash-method-not-correctly-overriden">Java Generics name clash, method not correctly overridden</a>), but either I did it wrong or this doesn't work:</p>
  
  <pre><code>public abstract class Superclass&lt;T&gt; implements Comparable&lt;T&gt; {
      public int compareTo(T bo) { };
  }
  
  public class Subclass&lt;T&gt; extends Namable&lt;Subclass&lt;?&gt;&gt; {
      public int compareTo(T bo) { }; // I get the name clash error here
  }
  </code></pre>
  
  <p>So, how can I override the <code>compareTo()</code> method of Superclass?</p>