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 meant by class and object in java?
What does s mean in regex?
Explain about sets?
What is string pool in java?
What access modifiers can be used for variables?
What are the advantages of unicode?
How many bits is a string?
Can a class be a super class and a sub-class at the same time? Give example.
Explain the difference between intermediate and terminal operations in java8?
What are recursive functions?
What is the difference between static (class) method and instance method?
How do you compare two strings lexicographically?
How to obtain a performance profile of java program
Is it necessary that each try block must be followed by a catch block?
What is the concatenation operator in java?