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

What is difference between wait and notify in java?

795


What is the need of transient variables in Java ?

803


Explain the difference between abstract class and interface in java?

746


What is instanceof keyword?

950


Write a program to show whether a graph is a tree or not using adjacency matrix.

842


Define canvas?

750


What are heap memory and stack memory and what are memory tables.

732


How do you print array in java?

737


What is object data type?

778


What are the two basic ways in which classes that can be run as threads may be defined?

815


What is another word for methodology?

749


Explain the selection sort algorithm?

850


Write a program to search a number in the given list of numbers.

828


What is used of static keyword in java?

770


what is server side caching?

1809