why Runnable interface is preferable than extending the
Thread class?
Answer Posted / srinu
you know that java does not supporting multiple inheritance
through classes .if u extend Thread class,u can't extend any
class which you required other than thread class.if u are
implementing runnable interface u can extend any class which
you required other than thread class.this is main advantage of
implementing java.lang.Runnable interface.
| Is This Answer Correct ? | 6 Yes | 3 No |
Post New Answer View All Answers
What will happen to the exception object after exception handling?
What is string immutability?
can java object be locked down for exclusive use by a given thread? Or what happens when a thread cannot acquire a lock on an object? : Java thread
What is module in oop?
Can I uninstall java?
Write a program to solve producer consumer problem in java?
How many wrapper classes are there in java?
Why webdriver is an interface?
Is java platform independent?
Is java ee a framework?
What are static variables and functions?
Is list thread safe in java?
What is binary search in java?
What is jit and its use?
what do you mean by marker interface in java?