title: How do I autonomously switch variable names in a for statement in java?
body: <pre><code>int[] col1 = new int[4];
  int[] col2 = new int[4];
  int[] col3 = new int[4];
  int[] col4 = new int[4];
  int reduction;
  int x = 1;
  
  for(int i=1; i&lt;=16; i++){
      if(i % 4 == 0){
          x++;
          reduction += 4;
      }
      [col(x)[(i-1)-reduction] = pool[i-1];
  }
  </code></pre>
  <p>In Java how would I go about automatically altering the variable name so that I don't have to make a separate for loop for each array? I'm trying to fill 4 separate arrays with the pool array values.</p>