Program in Java to Print an Integer entered by the user

import java.util.*;
public class Learner{
  public static void main(String[] args)
  { 
   Scanner sc=new Scanner(System.in);
   int number=sc.nextInt();
  System.out.println("Enter an integer: ");
  // print the 'number'
  System.out.println("Integer entered by user:"+ number);
  }
 }

OUTPUT

Enter an integer: 40
integer entered by user:40