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

Answer Posted / abnish kumar rajput

If we are going for using extend with thread then there is
no need to create thread object because we have
automatically all the properties of thread class ,then reuse
all these properties.whereas If are going for implement with
thread then we have to create of thread class and then we
have to override all the methods of thread class.because of
abstract class .

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are java methods?

820


Can we sort array in java?

729


What is jee6?

766


What are keywords give examples?

819


Can we catch more than one exception in a single catch block?

855


how we can make a write-only class in java?

794


What is an empty class? What functionality does it offer in Java?

983


Explain method overloading?

769


What is bigger kb or mb?

803


What is the main advantage of passing argument by reference?

733


What are methods?

779


In java, how many ways you can take input from the console?

759


What is another word for methodology?

775


What is java basic concept?

812


What is the use of private static?

798