title: Get multiple Integer values from a String?
body: <p>[It's not about converting a <code>String</code> into an <code>Integer</code>]</p>
  
  <p>I need to take some digits from a <code>String</code> that is a line by console command. </p>
  
  <p>For Example :</p>
  
  <pre><code>String str = "234 432 22 66 8 44 7 4 3 333";
  </code></pre>
  
  <p>How can I get every single <code>Integer</code> value and put them in an array?
  The order of digits is not important because the <code>String</code> could be:</p>
  
  <pre><code>String str = "34 434343 222";
  </code></pre>
  
  <p>or</p>
  
  <pre><code>String str = " 1 2 3 4 5 6 7";
  </code></pre>
  
  <p>Also, how can I get digits in these two cases (with one or more whitespace characters):</p>
  
  <pre><code>String str = "2 2 44 566";
  </code></pre>
  
  <p>and</p>
  
  <pre><code> String str = "2121     23  44 55 6   58";
  </code></pre>