title: Converting a String with spaces and numbers to an int array with just numbers
body: <p>I want to convert String lotto int an integer array. 
  String lotto is composed of a certain amount of numbers between 1 and 99 and is only composed of 1 and 2 digit numbers. (Example: String lotto might look like "1 34 5 23 7 89 32 4 10 3 6 5".)</p>
  
  <p>I am trying to solve the problem by converting the String to char[] and then the char[] to an int[]. My logical behind converting it to the char[] is make it possible to format the numbers for the int[].</p>
  
  <p>Here is what I have so far:</p>
  
  <pre><code>public static int[] conversion(String lotto)
  {
      char[] c = lotto.toCharArray();
      int[] a = new int[c.length];
      for(int i = 0, j = 0; i &lt; c.length; i++)
      {
          if(c[i] != ' ' &amp;&amp; c[i+1] != ' ')
          {
              a[j] = c[i] + c[i+1];
              i+=2;
              j++;
          }
          else if(c[i] != ' ' &amp;&amp; c[i+1] == ' ')
          {
              a[j] = c[i];
              i++;
              j++;
          }
      }
      return a;
  }//end of conversion method
  </code></pre>
  
  <p>I am still working on the rest of the program but I know that c[i] + c[i+1] with return an ASCII value or a different int rather than combining the two chars together (Example of what I want: '3' + '4' = 34.)</p>
  
  <p>How do I fix this problem?</p>