why Runnable interface is preferable than extending the
Thread class?

Answer Posted / srinu

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 ?    6 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How much ram can a 64 bit processor theoretically?

463


What’s meant by anonymous class?

594


how can i use a nonsynchronized hashtable?

2099


What is null mean in java?

621


How to sort list of list in java?

659






What is a ?

747


What is the purpose of extern variable?

529


What is difference between throw and throws ?

596


How will you calculate the depth of a binary tree if the tree contains 15 nodes?

596


Is java based on c?

531


worst case complexities of Quick sort and Merge sort.

599


Define canvas?

564


How many bits is a boolean?

618


What is a newline character in java?

563


Which collection allows duplicate values in java?

544