title: Create a two dimensional string array anArray[2][2]
body: <p>I'm currently on a self learning Java course and am completely stumped at one of my assignments, can anyone give me some pointers please? Bear in mind that I am completely new to Java so I need it to be as simple as.</p>
  
  <p>The question: 
  3. Create a Java program called TwoDimArray and implement the following:</p>
  
  <pre><code>Create a two dimensional string array anArray[2][2].
  Assign values to the 2d array containing any Country and associated colour. 
  
      Example:
  
      France Blue 
  
      Ireland Green 
  
  Output the values of the 2d array using nested for loops.
  </code></pre>
  
  <p>The code I have come up with that is also not working: </p>
  
  <pre><code>public class TwoDimArray {
    public static void main(String[] args) {
      char Ireland = 0;
      char Green = 1;
      char England = 2;
      char White = 3;
      char firstArray[][] = {{Ireland},{Green}};
      char secondArray[][] = {{England},{White}};
  
      System.out.println();
      display(firstArray);
      System.out.println();
      display(secondArray);
  
    }
  
    public static void display(char a[][]) {
      for (char row = 0; row &lt; a .length; row++) {
        for (char col = 0; col &lt; a [row] .length; col++) {
          System.out.print(a[row][col] + " ");
        }
  
        System.out.println();
      }
    }
  }
  </code></pre>
  
  <p>Can anyone give me some pointers? I can't seem to find anything that helps me on the web so thought I'd come here and ask.
  Thanks in advance.</p>