forked from dharmanshu1921/Java
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReactionTime.java
More file actions
Latest commit
25 lines (24 loc) · 748 Bytes
/
Copy pathReactionTime.java
File metadata and controls
25 lines (24 loc) · 748 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
importjava.util.Scanner;
publicclassReactionTime {
publicstaticvoidmain(String[] args) {
System.out.println("Get Ready");
try {
Thread.sleep(1000);
} catch (InterruptedExceptione) {
e.printStackTrace();
}
System.out.println("Set");
try {
Thread.sleep(2223);
} catch (InterruptedExceptione) {
e.printStackTrace();
}
System.out.println("Go!!!!!!!!!!!!!");
Scannersc = newScanner(System.in);
longstart = System.currentTimeMillis();
sc.next();
longend = System.currentTimeMillis();
System.out.println(end - start + "ms");
sc.close();
}
}