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
What is visibility mode?
What is difference between word and integer?
Difference between final and effectively final ? Why is effectively final even required ?
What is the applet security manager, and what does it provide?
Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?
What are the pillars of java?
How does thread synchronization occurs inside a monitor?
What are the common uses of "this" keyword in java ?
What do you understand by Header linked List?
How can I debug the Java security exceptions and AccessControlExceptions?
What is a char in java?
What is difference between module and function?
Why can't we make a class private in java?
Describe string intern() methodology
What are byte codes?