why Runnable interface is preferable than extending the
Thread class?
Answer Posted / praveen gupta
The main reason to implement Runnable interface is that 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 ? | 4 Yes | 0 No |
Post New Answer View All Answers
How will you print number in reverse (descending) order in BST.
Can we declare a static variable inside a method?
What are the different types of java?
How can we avoid including a header more than once?
What is module in oop?
Why object class is super class for every class in java?
What are the differences between processes and threads?
What are accessor methods in java?
Differences between C and Java?
How do you break a loop?
Explain about oops concepts.
Is zero a natural number?
Can we sort set in java?
What is meant by method?
Explain the difference between abstraction and encapsulation.