What is more advisable to create a thread, by implementing
a Runnable interface or by extending Thread class?
Answer Posted / abcd
Suppose ..you want to work with thread and also with a
class from AWT package.
java rule is that : YOu cannot extend more one class in
your program.
So it is adviseable to implement the runnable interface and
extend any other class which you desire....
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is module with example?
Why are the objects immutable in java?
What is a java list?
What is a super method?
What is treemap in java?
Differentiate between nested and inner class in java.
Is nullpointerexception checked or unchecked?
Why do we need data serialization?
Is list thread safe in java?
Does .length start 0 java?
What is getkey () in java?
How many times finalize method will be invoked? Who invokes finalize() method in java?
What are the three best choices for a development environment?
What all methods are used to prevent thread execution ?
Why do we override tostring method in java?