1> Implementing Runnable
interface.
2>Extending Thread class.
First case we have to
override run method of the interface. Also if we want to inherit any other
class in our thread then first case is appropriate and useful option, because
with the second case we can’t inherit any other class.
|
No comments:
Post a Comment