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
Why arraylist is used in java?
Is cout buffered?
What is difference between array and arraylist in java?
How do you insert a line break?
What happens if we don’t override run method ?
What is a generic data type?
What makes a function well defined?
What is thread safe in java?
Is void a keyword in java?
Why is the type for real numbers called double?
Explain about strings in java?
Why do we override tostring method in java?
What is string variable?
What is encapsulation in java?
What does main method?