title: Initialize Java Generic Array of Type Generic
body: <p>So I have this general purpose HashTable class I'm developing, and I want to use it generically for any number of incoming types, and I want to also initialize the internal storage array to be an array of LinkedList's (for collision purposes), where each LinkedList is specified ahead of time (for type safety) to be of the type of the generic from the HashTable class. How can I accomplish this? The following code is best at clarifying my intent, but of course does not compile.</p>
  
  <pre><code>public class HashTable&lt;K, V&gt;
  {
      private LinkedList&lt;V&gt;[] m_storage;
  
      public HashTable(int initialSize)
      {
          m_storage = new LinkedList&lt;V&gt;[initialSize];
      }
  }
  </code></pre>