Hi Friends, can you give difference between extending thread
class and implementing runnable interface.
Answer Posted / nagendra kumar
1.extends Thread and implements Runnable both are
fuctionally same.
2.If we use "extends Thread" then there is no scope to
extend another class because java doesn't multiple
inheritance.
3.If we use "implements Runnable" then there is a scope to
extend another class.This definately advantage why because
a programmer wants to extends a class and also use Thread
class features they must use Runnable interface.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is the advantage of OOP in java?
What is difference in between java class and bean?
What is singleton class in java and how can we make a class singleton?
What are the advantages of unicode?
What is data type in computer?
Can It is possible to synchronize the constructor of a Java Class?
Write a factorial program using recursion in java?
Explain different ways of creating a thread?
What does main method?
What is jdbc api?
Is empty .java file name a valid source file name?
What are the 4 types of characters?
What is static import?
How many bits is a 64 bit byte?
What is the concept of multithreading?