title: How to read integers from a text file into a 2D Array?
body: <p>I have integers in a text file, all separated by a space.</p>
  
  <p>I know how to read in the file, but I don't know how to place the integers into the array. I know that I have to use <code>parseInt</code> somewhere.</p>
  
  <p>The array is a 4x4. The integers are:  </p>
  
  <pre><code>2 1 4 2  
  9 7 5 3  
  9 8 3 5  
  1 0 0 0
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>arr = new int [4][4];
  IODialog input = new IODialog();
  String location = input.readLine("Enter the full path of the configuration text file: ");
  Scanner scn = null;
  try {
    scn = new Scanner(new BufferedReader(new FileReader(location)));
    int i, j = 0;
    String line = scn.nextLine(); 
    String[] numbers = line.split(" "); 
  } finally {
    if (scn != null) {
      scn.close();
     }
  }
  </code></pre>