Scanner class in use to read the input from the user. nextLine() method which used read line of the text. import java.util.*; class Example{ public static void main(String args[]) { Scanner input = new Scanner(System.in); System.out.print("Enter your number : "); int number = input.nextInt(); System.out.println(); System.out.println("Your Number : " + number); } } Ask to enter the Number if you …