title: Improve (Row)(Col) Iteration Efficiency - Java
body: <p>I am currently writing a long class for an application I am working on.
  There is 2 lines of code that are constantly being repeated, however I cannot think of a quicker way to do it!</p>
  
  <p>The lines are:</p>
  
  <pre><code>for (int row = 0; row &lt; 8; row++)
      for (int col = 0; col &lt; 8; col++)
          // Do Something
  </code></pre>
  
  <p>For such a simple "double loop" iteration, there must be some way of either reducing the number of times these two lines appear, or making the code simpler.</p>
  
  <p>Can anyone reduce the character count of this?</p>
  
  <p>EDIT:</p>
  
  <p>For more information,</p>
  
  <p>because the code is repeated so often, I either want to reduce the character count or use an alternative to two for-loops.</p>
  
  <p>the code is used as following (for examples):</p>
  
  <pre><code>for (int row = 0; row &lt; 8; row++)
      for (int col = 0; col &lt; 8; col++)
          setVal();   
  
  for (int row = 0; row &lt; 8; row++)
      for (int col = 0; col &lt; 8; col++)
          getVal(); 
  </code></pre>