Java program to take input from user
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("Enter a interger number");
int num = scanner.nextInt();
System.out.println("You have entered: " + num);
}
}