why Runnable interface is preferable than extending the
Thread class?
Answer Posted / suresh
u know that java not supporting multiple inheritance.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 runnable interface.
| Is This Answer Correct ? | 115 Yes | 13 No |
Post New Answer View All Answers
What is difference between variable declaration and definition?
What is the advantage of functional interface in java 8?
What is an interface in java? Explain
Given a singly linked list, how will you print out its contents in the reverse order? Can you do it with consuming any extra space?
What is <> used for in java?
What is object english?
Can we clone singleton object in java?
what do you mean by stream pipelining in java 8? Explain
How do you convert boolean to boolean?
Should you use singleton pattern?
Why do we need wrapper classes?
How do you square a number?
What is singleton class example?
Why wait(),notify(),notifyAll() methods defined in Object class althought we are using in only threads.
What are the drawbacks of singleton class?