title: What's the simplest way to convert a String Array to an int Array using Java 8?
body: <p>I'm currently learning how to use Java and my friend told me that this block of code can be simplified when using Java 8. He pointed out that the <code>parseIntArray</code> could be simplified. How would you do this in Java 8?</p>
  
  <pre><code>public class Solution {
      public static void main(String[] args) {
          Scanner input = new Scanner(System.in);
          String[] tokens = input.nextLine().split(" ");
          int[] ints = parseIntArray(tokens);
      }
  
      static int[] parseIntArray(String[] arr) {
          int[] ints = new int[arr.length];
          for (int i = 0; i &lt; ints.length; i++) {
              ints[i] = Integer.parseInt(arr[i]);
          }
          return ints;
      }
  }
  </code></pre>