title: resetting a variable back to starting value in a nested loop
body: <p>I wish to reset my variable i back to 100 after the first loop has completed its run.</p>
  
  <p>Currently once i enter the second loop my i variable begins at 600, but i want to reset this back to 100. Help would be much appreciated.</p>
  
  <p>I cant just state i = 100 again as i has already been declared.</p>
  
  <pre><code>int i = 100; 
  int j = 50;
  
  for (int index1 = 0; index1 &lt; 4; index1++){
    for (int index = 0; index &lt; 10; index++){
      vol1HH.add(new JTextField());
      vol1HH.get(index).setBounds(i, 50, 80, h);
      window.add(vol1HH.get(index));
      i = i + 50;
    }
    // this is where I want to reset my i variable back to 100
    vol1HH.add(new JTextField());
    vol1HH.get(index1).setBounds(i, j, 80, h);
    window.add(vol1HH.get(index1));    
    j = j + 50;
  }
  </code></pre>