parallel input through java utility scanner
<p>I want to ask that, is there a way to parallelize the input from a text file through Java utility scanner?</p>

<p>I have a simple program that reads integer values from a text file, adds them and shows the result. I have 11 values (<code>10 1 2 3 4 5 6 7 8 9 10</code>) in the input file (one for <em>N</em> and the other 10 to be added), I want to have two threads working simultaneously. one reads values from 1 to 5 and the other from 6 to 10 from the text file using Java utility scanner. is it possible?
if yes, how can I do it?</p>

<pre><code>import java.util.Scanner;

public class SimpleSum {

    public static void main(String[] args) {

    Scanner console = new Scanner(System.in);
    int N = console.nextInt();
    int sum = 0;

    for (int i=0; i&lt;N; i++){
        sum = sum + console.nextInt();
    }
        System.out.println(sum);
    }
}
</code></pre>