ü 1. One is
to declare a class to be a subclass of "Thread".This
subclass should override the run method of class Thread. An instance
of the subclass can then be allocated and started.
ü 2. The
other way to create a thread is to declare a class that implements the is "Runnable"
interface. That class then implements the run method. An instance of the class can then be allocated, passed as an
argument when creating Thread, and started.
No comments:
Post a Comment