-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInput.java
More file actions
37 lines (28 loc) · 838 Bytes
/
Copy pathInput.java
File metadata and controls
37 lines (28 loc) · 838 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package variablesanddatatypes;
import java.util.*;
public class Input {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// String input = sc.next();
// System.out.println(input);
// String input = sc.nextLine();
// System.out.println(input);
// int num = sc.nextInt();
// System.out.println(num);
long num = sc.nextLong();
System.out.println(num);
sc.close();
}
}
/*
Input in java:
next - for single word input
nextLine - for multiple words and sentences
nextInt - for integer input
nextByte - for byte input
nextFloat - for float input
nextDouble - for double input
nextBoolean - for boolean input (true/false)
nextShort - for short input
nextLong - for long integer input
*/