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


Please Help Members By Posting Answers For Below Questions

Is it possible to specify multiple jndi names when deploying an ejb?

788


When wait(), notify(), notifyall() methods are called does it releases the lock or holds the acquired lock?

772


What is member in java?

707


What is java ceil?

799


how can you take care of mutual exclusion using java threads? : Java thread

833


What do you understand by abstract classes?

842


Why chararray() is preferred over string to store the password?

778


Is the empty set a singleton?

734


Is singleton thread safe in java?

756


How is hashset defined in java?

748


Why does abstract class have constructor?

774


Define how destructors are defined in java?

784


What is visibility mode?

741


Why java uses the concept of the string literal?

774


What does yield method of the thread class do?

776