import java.util.Scanner;
Scanner s = new Scanner(System.in);
int number = s.nextInt();
If you want to read an int from the command line, just use this snippet.
First of all, you have to create a Scanner object, that listens to System.in, which is by default the Command Line, when you start ...