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 wait and notify in java?
What is the need of transient variables in Java ?
Explain the difference between abstract class and interface in java?
What is instanceof keyword?
Write a program to show whether a graph is a tree or not using adjacency matrix.
Define canvas?
What are heap memory and stack memory and what are memory tables.
How do you print array in java?
What is object data type?
What are the two basic ways in which classes that can be run as threads may be defined?
What is another word for methodology?
Explain the selection sort algorithm?
Write a program to search a number in the given list of numbers.
What is used of static keyword in java?
what is server side caching?