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
Is it possible to specify multiple jndi names when deploying an ejb?
When wait(), notify(), notifyall() methods are called does it releases the lock or holds the acquired lock?
What is member in java?
What is java ceil?
how can you take care of mutual exclusion using java threads? : Java thread
What do you understand by abstract classes?
Why chararray() is preferred over string to store the password?
Is the empty set a singleton?
Is singleton thread safe in java?
How is hashset defined in java?
Why does abstract class have constructor?
Define how destructors are defined in java?
What is visibility mode?
Why java uses the concept of the string literal?
What does yield method of the thread class do?