why Runnable interface is preferable than extending the
Thread class?

Answer Posted / susheeel

Many Java programmers feel that classes should be extended
only when they are enhanced or modified in some way.So,if
you will not be overriding any of Thread's other methods,it
is probably best simply to implement Runnable.

Is This Answer Correct ?    32 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is complexity and its types?

526


What are the drawbacks of reflection?

565


What is difference between iterator and enumeration in java?

527


What is double parsedouble in java?

550


Why java is a platform independent? Explain

536






What is the difference between Grid and Gridbaglayout?

584


When should a function throw an exception?

599


What is variable and example?

521


What are advantages of exception handling in java?

588


Distinguish between a predicate and a function?

574


What is method overloading with type promotion?

581


Does constructor be static?

566


When should I use a singleton?

561


What is the relationship between clipping and repainting under awt?

616


What are the disadvantages of object oriented programming?

601