title: Java scanner not working on eclipse
body: <p>The program compiles and runs, but it is not allowing me to input any value. The program just ends without letting me input anything. Why?</p>
  
  <pre><code>package prac;
  
  import java.util.Scanner;
  
      public class prac {
  
          public static void main(String args[]) {
  
              Scanner input = new Scanner(System. in );
              int number;
              System.out.println("Input number: ");
              number = input.nextInt();
              System.out.println(number);
  
  
          }
  
      }
  </code></pre>