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

Hi i am creating desktop application in that i want calling to mobile number. i have java telephone api (JTAPI) but i dont understand how it configure & use plese help me

1457


Which non-unicode letter characters may be used as the first character of an identifier?

678


If an application has multiple classes in it, is it okay to have a main method in more than one class?

636


What is java full form?

614


What restrictions are placed on method overriding in java programming?

636






Define inheritance with reference to java.

669


Explain the importance of throwable class and its methods?

658


In the below example, what will be the output?

675


Why is a string immutable?

648


What is scope & storage allocation of global and extern variables? Explain with an example

673


Why 1 is not a prime number?

662


How many techniques can be employed to create a string object?

638


how to create multithreaded program? : Java thread

614


How does enum work in java?

640


Can a constructor be private and how are this() and super() method used with constructor?

626