+ 3

What is the difference between implement Runnable interface and extends the Thread?

Why do we need Runnable interface when we have Thread class.... https://code.sololearn.com/cVPV6d31exFh/?ref=app

26th Aug 2019, 7:40 AM
Shahid Iqbal
Shahid Iqbal - avatar
7 ответов
+ 1
Any class whose instance needs to be executed by a thread should implement the Runnable interface. More details are provided in this link, https://www.callicoder.com/java-multithreading-thread-and-runnable-tutorial/ Good Luck~
26th Aug 2019, 7:43 AM
Uchiha Itachi
Uchiha Itachi - avatar
+ 1
Not sure but I upvoted
31st Aug 2019, 10:09 AM
Jay
Jay - avatar
+ 1
Stack has an excellent explanation! Research there!
31st Aug 2019, 11:39 AM
Tony Love Jones
Tony Love Jones - avatar
0
Let me try
31st Aug 2019, 11:54 AM
Shahid Iqbal
Shahid Iqbal - avatar
31st Aug 2019, 9:12 PM
Shahid Iqbal
Shahid Iqbal - avatar
31st Aug 2019, 9:12 PM
Shahid Iqbal
Shahid Iqbal - avatar