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

What are recursive functions?

815


What are the important features of Java 11 release?

808


What is the abstraction?

803


What is the purpose of void?

761


What is the difference between iterator and list iterator?

755


Do extraneous variables affect validity?

719


Why string is called as immutable?

729


How can we create a synchronized collection from given collection?

861


How do you sort data in java?

743


Why java is made?

770


What is the finalize method do?

837


What do you mean by thread safe?

772


What happens if we override private method?

760


What is the final class?

756


What is integer size in java?

721