How to correctly use Scanner to print output stream : <p>I am using Scanner to take in input and print output but ln.nextLine() jumps to next line to scan.</p>

<pre><code>  Scanner in = new Scanner(System.in);
        System.out.println("ENTER ID: ");
           String line = null;
            while (in.hasNext()) {
                line = in.nextLine();

                if (line.toLowerCase().equals("exit")) {
                    break;
                }  else {
                    System.out.println("number entered 
                      "+Integer.parseInt(line));
                }

                System.out.println("ENTER ID: ");

        }
</code></pre>

<p><strong>This produces a output like:</strong><br>
ENTER ID:<br>
78<br>
number entered 78<br>
ENTER ID:<br>
89<br>
number entered 89</p>

<p><strong>Desired output is:</strong><br>
ENTER ID:  78<br>
number entered 78<br>
ENTER ID:  89<br>
number entered 89 </p>

<p>what part of println sequence should I change to achieve this?</p>
