title: Assigning variables with dynamic names in Java
body: <p>I'd like to assign a set of variables in java as follows:</p>
  
  <pre><code>int n1,n2,n3;
  
  for(int i=1;i&lt;4;i++)
  {
      n&lt;i&gt; = 5;
  }
  </code></pre>
  
  <p>How can I achieve this in Java?</p>