Java reading a file of numbers and printing them out
<p>I have this code</p>

<pre><code>Scanner scanner = new Scanner("hello.txt");
   while(scanner.hasNextInt()){
       int i = scanner.nextInt();
       System.out.println(i);
    }
</code></pre>

<p>the data values I have in a hello.txt are</p>

<p>1 2 3 22 33 123</p>

<p>but when I run the program there is no output.
Is there something I am not using / line of code??</p>
