+ 11

Why implementing runnable interface approach is better than the extending thread

3rd May 2017, 8:40 AM
CHETHAN H.N
CHETHAN H.N - avatar
2 Antworten
+ 5
Because if you extending other class you can not extend Thread for obvious reason. And if you would want later to extend some class that already extends Thread it will be a problem. Interface is more flexible solution.
3rd May 2017, 9:37 AM
Jeth
Jeth - avatar
+ 2
as i know if you extend with Thread class rather than Runnable, then it will add extra overhead to class.
3rd May 2017, 1:09 PM
Keshave Jat
Keshave Jat - avatar