title: String Array with enhanced for loop
body: <p>A bit of advice needed here, 
  I am trying to code
  Create a String Array containing any six first names.
      Use an enhanced for loop to print each name in the array
  Here is what I have:</p>
  
  <pre><code>public class names {
     private static String[] arrayString;
     private static String[] names;
  
     /**
      * @param args the command line arguments
      */
     public static void main(String[] args) {               
        String[][]firstnames={
          {"John", "Mary", "Harry", "Ray", "Sean", "Matthew" },
        };
  
        for (int row=0;row&lt;firstnames.length;row++){
           for(int col=0; col&lt;firstnames[row].length; col++){
               System.out.print(firstnames[row][col]+ " ");
               System.out.println();
           }
        }                
     }    
  }
  </code></pre>
  
  <p>I am being told that you have used fixed values for the conditions on the loops instead of the lengths of the array. </p>
  
  <p>It is better to use the length of the array for maintenance etc</p>
  
  <p>I have spent a long time trying to figure out where I have gone wrong, as far as I can see I have answered the question. Can someone point me in the right direction?</p>