- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscanner.java
More file actions
Latest commit
18 lines (15 loc) · 426 Bytes
/
Copy pathscanner.java
File metadata and controls
18 lines (15 loc) · 426 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//imports...
importjava.util.Scanner;
classscanner {
publicstaticvoidmain(String[] args) {
//instances..
intnumber;
//Creating an Scanner object named input...
Scannerinput = newScanner(System.in);
//taking input using Scanner..
System.out.print("Enter a Number: ");
number = input.nextInt();
//Printing input using Scanner...
System.out.println("You Entered: "+number);
}
}