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?
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);
}
}