import java.util.Scanner; public class Myinput { public static void main(String[] args) { Scanner reader = new Scanner(System.in); // Reading from System.in System.out.print("Enter a number: "); int n = reader.nextInt(); // Scans the next token of the input as an int System.out.println("You entered " + n); reader.close(); } }