Possible Duplicate:
Java: “implements Runnable” vs. “extends Thread”
Thread is a class, and when you say start()
you create a thread of execution which is attached to an instance of Thread class. Therun()
method of Runnable is called making it execute the task on to the thread of execution, and the start()
method returns quickly.
Runnable
is the task that is assigned to the newly created thread of execution.
So, without the Thread class, you cannot run your Runnable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With