Hi Friends, can you give difference between extending thread
class and implementing runnable interface.

Answer Posted / murali.25

both will achieve the same functionality. Usually we implement runnable interface because if we extend thread and if we want to any application specific class, its not possible because java doesnt support multiple inheritance.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is proper subset?

642


What do you mean by constant time complexity?

685


Does constructor creates the object ?

687


How can we make sure main() is the last thread to finish in java program?

779


Is singleton class thread safe?

633






What is the use of predicate in java 8?

571


What advantage do java's layout managers provide over traditional windowing systems?

633


What is super keyword explain with example?

641


Explain implementation and how is it different from conversion?

679


Which class is the superclass for all the classes?

629


What is an image buffer?

622


What is an example of character?

663


how to deploy tomcatserver to weblogic server? write d following steps?

1536


What is an array in java?

735


What will happen if static modifier is removed from the signature of the main method?

608