import java.util.Scanner;
public class demo1 {
public static void main(String[] args) {
Scanner reader = new Scanner(System.in);
System.out.print("Enter a number: ");
int number = reader.nextInt();
System.out.println("You entered: " + number);
}
}Java
Program to Print an Integer entered by an user.

Written by
View ProfileNikhil Juneja
Passionate software developer and technical contributor at TutorialsLink.
