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 to disable caching on back button of the browser?
How does predicate work in java?
Why are the objects immutable in java?
Is array synchronized in java?
Which is better arraylist or vector?
what is ststic with example
What is the difference between an interface and an abstract class?
Explain list interface?
What is the basic concepts of OOPS?
Why do I need to declare the type of a variable in java?
Implement 2 stacks with just 1 array. The stack routines must not indicate overflow unless every slot in array is used.
Give us the name of the list layoutmanagers in java?
What are the super most classes for all the streams?
What are exception handling keywords in java?
What are the states of thread in java?