title: How to know that a List has a particular index?
body: <p>There is a <code>List</code> :</p>
  
  <pre><code>List&lt;Integer&gt; l = new ArrayList&lt;Integer&gt;();
  l.add(300);
  l.add(3070);
  if (l.get(8) == null) System.out.println("null"); else System.out.println("something else");
  </code></pre>
  
  <p>At runtime I got ArrayIndexOutOfBound exception , so how to know that a particular index exists?</p>