title: Initializing an array of pairs in Java
body: <p>I would like to initialize an Array of pairs but my way is not fully correct.
  Here how I first wrote it:</p>
  
  <pre><code>Pair&lt;String, Integer&gt;[] pair = new Pair[5];
  </code></pre>
  
  <p>It is accepted and it works but there is still the following warning: </p>
  
  <blockquote>
    <p>"Unchecked assignment: <code>'android.util.Pair[]'</code> to <code>'android.util.Pair&lt;Java.lang.String, Java.lang.Integer&gt;[]'</code>...</p>
  </blockquote>
  
  <p>I already tried to do like this: </p>
  
  <pre><code>Pair&lt;String, Integer&gt;[] pair = new Pair&lt;String, Integer&gt;[5];
  </code></pre>
  
  <p>but it doesn't work.</p>