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 does the java compiler work?
What is difference between stringbuffer and string?
Explain different states of a thread in java?
What does system.gc() and runtime.gc() methods do?
Does java vector allow null?
why Java does not support multiple inheritances?
What does indexof return in java?
What is the difference between integer parseint and integer valueof?
Who is the owner of java?
What is generics in java interview questions?
What is illegal identifier in java?
What is length in java?
Why is multiple inheritance not supported in java?
What is the difference between heap memory and stack memory?
How do I get a substring?