title: Sorting a subclass in Java
body: <p>Suppose a <code>Superclass implements Comparable&lt;Superclass&gt;</code>, such that <code>Arrays.sort(ArrayOfSuperInstances);</code> uses this <code>compareTo(Superclass other)</code> method to sort. Does this guarantee that an array of instances of <code>Subclass extends Superclass</code> will sort in the same way using <code>Arrays.sort(ArrayOfSubInstances);</code> ? (Assuming the compareTo is not overloaded in the subclass definition)</p>
  
  <p>Or in other words, will <code>Subclass</code> by default inherit the <code>compareTo</code> method of its <code>Superclass</code> , so that one can blindly use <code>Arrays.sort()</code> knowing they will be sorted as superclasses would be?</p>