Hi All,
1. class MyThread extends Thread {
2.public static void main(String args[]) {
3.MyThread t = new MyThread();
4.Thread x = new Thread(t);
5.t.start();
6.}
7. }
Now this was taken from Kathy & Bert's book - and the code works. I don't understand line 4 though. I thought that Thread constructor only took combinations of Runnable, String, ThreadGroup or nothing.
How come this works with an instance of MyThread, a subclass of Thread ?
Thanks in advance.