title: how come Eclipse compiles this Java code but not Ant?
body: <p>This compiles find using Eclipse:</p>
  
  <pre><code>abstract class CollectionView implements Collection&lt;Object&gt; {
  
  ...
          public Object[] toArray(Object[] o) {
              if (fast) {
                  return get(map).toArray(o);
              } else {
                  synchronized (map) {
                      return get(map).toArray(o);
                  }
              }
          }
  ...
  }
  
      class KeySet extends CollectionView implements Set&lt;Object&gt; {
  
          protected Collection&lt;Object&gt; get(Map&lt;Object, Object&gt; map) {
              return map.keySet();
          }
  
          protected Object iteratorNext(Map.Entry entry) {
              return entry.getKey();
          }   
      }
  </code></pre>
  
  <p>but it fails to compile when using Ant:</p>
  
  <blockquote>
    <p>error: KeySet is not abstract and does not override
    abstract method toArray(T[]) in Set</p>
  </blockquote>
  
  <p>I can see why the code would compile using Eclipse: KeySet already inherits the implementation of the toArray(T[]) method from CollectionView.</p>
  
  <p>But why does it fail when I compile using Ant?</p>
  
  <pre><code>    &lt;javac srcdir="src" destdir="bin" debug="on"&gt; 
          &lt;compilerarg value="-Xlint:unchecked"/&gt;
          &lt;compilerarg value="-Xlint:deprecation"/&gt;
      &lt;/javac&gt;
  </code></pre>