Java Program to print the given integer number

Get a number from user and display the same

Sample Input 1:


Sample Output 1:


Program or Solution

import java.util.*;
class Integer
    public static void main(String args[])
       int Input1; 
       Scanner sc= new Scanner(;
       System.out.println("Enter The Input1 :");
       Input1= sc.nextInt();

Program Explanation

The Scanner class, which is part of the java.util package, is used to get user input. To use the Scanner class, create an object of the class and call any of the methods listed in the documentation for the Scanner class. The nextInt() method, which is used to read Integers, are used in our example.

The Input is stored in the variable Input1 and printed in console using println() function which is the part of System.out package.


It will helpful and i need a learning video and different method of learning new things