best way for implementing thread in java

khushboo652's Avatar
pls give me the answer which is the best way to implement thread in java runnable interface or inheritance and why?
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
What all ways you have tried and looking for best amont them?
virxen's Avatar, Join Date: Nov 2009
Pro contributor
dagdu's Avatar, Join Date: Feb 2012
Newbie Member
By implementing runnable interface is best way to implement.By implementing we can reuse that thread and we can extends any other useful class.
alia123's Avatar, Join Date: Jan 2016
Go4Expert Member
There are two ways of implementing threading in Java

1) By extending java.lang.Thread class, or

2) By implementing java.lang.Runnable interface.

Read more:
Check this site for examples.