ThreadsDemo
Added Interface part, Still missing anon and lambda part
This commit is contained in:
@@ -5,27 +5,23 @@ public class ThreadsDemo {
|
||||
ThreadsExtend myThreadA = new ThreadsExtend("A");
|
||||
ThreadsExtend myThreadB = new ThreadsExtend("B");
|
||||
ThreadsExtend myThreadC = new ThreadsExtend("C");
|
||||
Runnable myRunnableD = new ThreadsInterface("D");
|
||||
Runnable myRunnableE = new ThreadsInterface("E");
|
||||
myThreadA.start();
|
||||
myThreadB.start();
|
||||
myThreadC.start();
|
||||
Thread myThreadD = new Thread( myRunnableD );
|
||||
myThreadD.start();
|
||||
Thread myThreadE = new Thread( myRunnableE );
|
||||
myThreadE.start();
|
||||
|
||||
try {
|
||||
myThreadA.join();
|
||||
} catch (InterruptedException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
try {
|
||||
myThreadB.join();
|
||||
} catch (InterruptedException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
try {
|
||||
myThreadC.join();
|
||||
} catch (InterruptedException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user