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


Please Help Members By Posting Answers For Below Questions

Write a program based on Java script program.

639


List the features of java programming language.

556


Can we make a constructor final?

539


Do you know how to reverse string in java?

578


Is 0 a prime number?

568






How can you say java is object oriented?

587


How do you do math powers in java?

570


How can you avoid serialization in child class if the base class is implementing the serializable interface?

629


What is return keyword in java?

556


What is the significance of java packages?

609


What is stringbuffer in java?

539


Can java list be null?

545


what is the final keyword denotes in java?

579


What is parse method?

531


What do you know about the garbage collector in java?

570