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
Write a program based on Java script program.
List the features of java programming language.
Can we make a constructor final?
Do you know how to reverse string in java?
Is 0 a prime number?
How can you say java is object oriented?
How do you do math powers in java?
How can you avoid serialization in child class if the base class is implementing the serializable interface?
What is return keyword in java?
What is the significance of java packages?
What is stringbuffer in java?
Can java list be null?
what is the final keyword denotes in java?
What is parse method?
What do you know about the garbage collector in java?