Sunday, September 2, 2012

Why I like Runnable more than Thread?

When creating a thread in JAVA, there are 2 reasons why I choose to implementing Runnable interface is more preferable than extending Thread class.

Reason 1
Extending Thread class will limit the subclass from extending other class.
Reason 2
I am just interest in Runnable class rather than extension of Thread class.

No comments: