title: Reading text file into array and modifying
body: <p>I'm wanting to read a normal text file into a double array. The text file is in the following format(except without the spaces in between lines):</p>
  
  <pre><code>5,1,1,1,2,1,3,1,1,2
  
  5,4,4,5,7,10,3,2,1,4
  
  3,1,1,1,2,2,3,1,1,2
  
  6,8,8,1,3,4,3,7,1,4
  
  4,1,1,3,2,1,3,1,1,2
  </code></pre>
  
  <p>However whilst reading this into an array I would like to have the first 9 attributes into decimal if itself (essentially divided by 10) and the last number (2 or 4) to have to separate "columns" when it's 2 to input a 0 into 10th column of the 2D array and 1 in the 11th and vice versa if it's a 4.
  In essence I want it formatted to look something like this:</p>
  
  <pre><code>{0.5, 0.1, 0.1, 0.1, 0.2, 0.1, 0.3, 0.1, 0.1, 0, 1},
  
  {0.5, 0.4, 0.4, 0.5, 0.7, 1, 0.3, 0.2, 0.1, 1, 0},
  </code></pre>
  
  <p>Any help would be much appreciated.</p>
  
  <pre><code>for (String str : values) {
      double str_double = Double.parseDouble(str);
      myDouble[x][y]=str_double/10;                               
      System.out.print(myDouble[x][y] + " ");
      y = y + 1;
  }
  </code></pre>