sono le basi...

import java.util.Scanner;

Scanner in = newScanner(System.in);

int numero = in.nextInt();