-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSleep.java
More file actions
37 lines (28 loc) · 749 Bytes
/
Sleep.java
File metadata and controls
37 lines (28 loc) · 749 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 com.jspiders.multithreading.sleep;
public class Sleep {
public static void main(String[] args) {
System.out.println("Main Class Statement 1");{
try {
Thread.sleep(5000);
}catch(InterruptedException e) {
e.printStackTrace();
}
System.out.println("Main Class Statement 2");{
try {
Thread.sleep(3000);
}catch(InterruptedException e){
e.printStackTrace();
}
System.out.println("Main Class Statement 3");
try {
Thread.sleep((long) 1000.00);
}catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println("Main Class Statement 4");
System.out.println("Main Class Statement 5");
System.out.println("Main Class Statement 6");
}
}
}
}