Program in Javato Print an Integer entered by the user Copy
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);
}
}