forked from PacktPublishing/Java-Coding-Problems
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
34 lines (21 loc) · 816 Bytes
/
Main.java
File metadata and controls
34 lines (21 loc) · 816 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
package modern.challenge;
public class Main {
public static void main(String[] args) throws InterruptedException {
NewThread nt = new NewThread();
nt.newThread();
Thread.sleep(5000);
RunnableThread rt = new RunnableThread();
rt.runnableThread();
Thread.sleep(5000);
WaitingThread wt = new WaitingThread();
wt.waitingThread();
Thread.sleep(5000);
TimedWaitingThread twt = new TimedWaitingThread();
twt.timedWaitingThread();
Thread.sleep(5000);
TerminatedThread tt = new TerminatedThread();
tt.terminatedThread();
BlockedThread bt = new BlockedThread();
bt.blockedThread();
}
}