Share your repls and programming experiences

← Back to all posts
java program to print a number from the user
GobinathThilaga (0)

import java.util.Scanner;
public class Main
public static void main(String args[])
int number;
Scanner scan = new Scanner(;
System.out.print("Enter the number ");
number = scan.nextInt();
System.out.print("Entered number " +number);

Enter the number 456
Entered number 456