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
Is map sorted in java?
Can an interface be final?
Is string a class?
What happens to the Exception object after handling an exception?
What is the use of beaninfo?
Are arrays passed by reference in java?
What is the indent key?
Write a code to create a trigger to call a stored procedure
Why to use nested classes in java? (Or) what is the purpose of nested class in java?
What is a parameter used for?
What is logical variable?
What is meant by structural programming?
Can I declare class as static or private?
Can a private method be declared as static?
What is parseint?