title: "but the compiler doesn't know this" - what's the sense?
body: <p>I've met a such kind of code and comments in the <code>java.util.ImmutableCollections</code> class:</p>
  
  <pre><code>static final class List0&lt;E&gt; extends AbstractImmutableList&lt;E&gt; {
      ...
      @Override
      public E get(int index) {
          Objects.checkIndex(index, 0); // always throws IndexOutOfBoundsException
          return null;                  // but the compiler doesn't know this
      } 
      ...
  }
  </code></pre>
  
  <p>Why not just <code>throw new IndexOutOfBoundsException(...)</code>? What's the reason?</p>