title: converting string array into int array
body: <p>this is what i have so far, i need to convert this string array into just an array of integers, the string array looks something like this</p>
  
  <pre><code>wholef[0] = "2 3 4";
  wholef[1] = "1 3 4";
  wholef[2] = "5 3 5";
  wholef[3] = "4 5 6";
  wholef[4] = "3 10 2";
  </code></pre>
  
  <p>these values come from a text file that i read from but now i need to convert this into one big array of integers, im trying to use the split method but im not sure if it will work on this kind of setup. if anyone can give me a better way it would be nice but i just need to convert this into an array of integers, thats really all i need.</p>
  
  <pre><code>for(int k = 0; k &lt; fline; k++)
      {
          String[] items = wholef[k].replaceAll(" ", "").split(",");
  
          int[] parsed = new int[wholef[k].length];
  
          for (int i = 0; i &lt; wholef[k].length; i++)
          {
              try 
              {
                  parsed[i] = Integer.parseInt(wholef[i]);
              } catch (NumberFormatException nfe) {};
          }
      }
  </code></pre>
  
  <p>This is the new code im using now, its very close cause i only get one error</p>
  
  <pre><code>int q = 0;
          for (String crtLine : wholef) 
          {
              int[] parsed = new int[wholef.length];
  
              String[] items = crtLine.split(" ");
              for (String crtItem: items) 
              {
                  parsed[q++] = Integer.parse(crtItem);
              }
          }
  </code></pre>
  
  <p>the error is this
  java:97: error: cannot find symbol parsed[q++} = Integer.parse(crtItem);
                                                          ^
  symbol: method parse(String)
  location: class Integer
  1 error</p>