title: Difference between ArrayList declarations
body: <p>I was reading online and I saw a declaration for an <code>ArrayList</code> as </p>
  
  <pre><code>ArrayList[] graph = new ArrayList[numCourses];
  </code></pre>
  
  <p>Traditionally, I thought that <code>ArrayList</code>s were always declared as </p>
  
  <pre><code>ArrayList&lt;type&gt; graph = new ArrayList&lt;type&gt;();
  </code></pre>
  
  <p>What's the difference between these two? The rest of the code seemed to utilize the same functions from the <code>ArrayList</code> class, but with specific indices. </p>