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
How to create a thread in java?
What is the difference between stored procedure & function?
How do I convert a numeric ip address like 192.18.97.39 into a hostname like java.sun.com?
Can I extend singleton class in java?
Considering notepad/ie or any other thing as process, what will happen if you start notepad or ie 3 times? Where 3 processes are started or 3 threads are started?
What is general methodology?
What is dynamic binding(late binding)?
Explain jvm, jre, and jdk?
Difference between string, stringbuffer and stringbuilder?
What is string [] args?
What is the difference between == and === javascript?
Explain list interface?
Name component subclasses that support painting in java programming?
Differentiate storage classes on the basis of their scope?
Is singleton thread safe in java?