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 a void in java?

808


Differentiate between a class and an object.

818


How to solve the problem of generating the unique hash keys with hash function?

1696


Is string is a data type?

765


What is javac used for?

716


Why we use protected in java?

761


Which variables are stored in heap?

789


What is the difference between the paint() and repaint() methods?

824


What are the object and class classes used for?

809


What classes of exceptions may be caught by a catch clause in java programming?

965


Tell me the latest versions in java related areas?

865


What is linked hashset and its features?

762


why Java does not support multiple inheritances?

941


What is the difference between assignment and initialization?

826


Why is multiple inheritance not supported in java?

796