title: Issue about java 8 backward compatibility: new methods in JDK
body: <p>Simple question. In Java 8 we have huge number of new methods in JDK classes. Say we have created such class, using Java 7 (or Java 6):</p>
  
  <pre><code>class MyArrayList&lt;E&gt; extends ArrayList&lt;E&gt; {
          public void sort(Comparator&lt;E&gt; c) {
              // some sort
          }
  }
  </code></pre>
  
  <p>This is quite reasonable implementation. Now we try to compile it with Java 8 and receive expectable compile error:</p>
  
  <pre><code>error: name clash: sort(Comparator&lt;E#1&gt;) in MyArrayList and sort(Comparator&lt;? super E#2&gt;) in ArrayList have the same erasure, yet neither overrides the other
              public void sort(Comparator&lt;E&gt; c) {
                          ^   where E#1,E#2 are type-variables:
      E#1 extends Object declared in class I.MyArrayList
      E#2 extends Object declared in class ArrayList
  </code></pre>
  
  <p>Here I would like to arise 2 questions:</p>
  
  <ol>
  <li><p>Even with <code>javac -source 1.7 -target 1.7</code> option using JDK 8 I receive <strong>same</strong> error - why? I thought these options should allow compile legacy code.</p></li>
  <li><p>How about backward compatibility in general?</p></li>
  </ol>
  
  <p><strong>EDIT</strong> To be precise, may be I'm doing something wrong? JDK 1.8.0_65, Mac OS X:</p>
  
  <pre><code>bash-3.2$ javac -version
  javac 1.8.0_65
  bash-3.2$ javac -source 1.7 -target 1.7 MyArrayList.java 
  warning: [options] bootstrap class path not set in conjunction with -source 1.7
  MyArrayList.java:7: error: name clash: sort(Comparator&lt;E#1&gt;) in MyArrayList and sort(Comparator&lt;? super E#2&gt;) in ArrayList have the same erasure, yet neither overrides the other
      public void sort(Comparator&lt;E&gt; c) {
                  ^
    where E#1,E#2 are type-variables:
      E#1 extends Object declared in class MyArrayList
      E#2 extends Object declared in class ArrayList
  1 error
  1 warning
  </code></pre>