What is more advisable to create a thread, by implementing
a Runnable interface or by extending Thread class?
Answer Posted / bindhu solomon
Creating a thread using implementing Runnable interface
are more advisable. Suppose we are creating a thread by
extending a thread class, we cannot extend any other class.
If we create a thread by implementing Runnable interface,
we can extend another class.
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What is the purpose of a parameter?
What is indexof in java?
Explain treeset?
What is the difference between the final method and abstract method?
What is balanced tree in java?
Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).
Which is better arraylist or vector?
What is jvm? How its run?
What is the use of isempty in java?
Is java util regex pattern thread safe?
How do you sort objects in java?
what are Hostile Applets?
Why doesn't the java library use a randomized version of quicksort?
What is the difference between menuitem and checkboxmenu item?
What does %4d mean in java?