Generic array creation error with LinkedHashMap<Integer, String>[] : <p>I've declared a variable as:</p>

<pre><code>LinkedHashMap&lt;Integer, String&gt;[] function_labels;
</code></pre>

<p>but when I try and instantiate it with:</p>

<pre><code>function_labels = new LinkedHashMap&lt;Integer, String&gt;[2];
</code></pre>

<p>I get a 'generic array creation' error.</p>

<p>I've searched on here, and although there are many posts about this error message,
no-one seems to have offered a solution which actually works, so I'm trying again...</p>

<p>I don't mind what type of collection <code>function_labels</code> is, as long as it works and I can access indexed members of it later. A simple array seems the 'lightest' solution, but there may be others which will work.</p>

<p>Thanks</p>
