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
What is bufferedreader in java?
Can we have any code between try and finally blocks?
What is boolean strategy?
Name the components that are termed to be Heavy-weight component but available in Light-weight components?
Can I uninstall java?
What is scope & storage allocation of global and extern variables? Explain with an example
How will you reverse a link list without using recursion?
What is a singleton in genetics?
How do you invoke a method?
What is a 16 bit word?
What are the differences between path and classpath variables?
What is int lol?
What is the collections api?
What is difference between overloading and overriding in java?
What is a class in java?