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
Realized?
What is the difference between yield() and sleep()?
Difference between nested and inner classes ?
What does a method signature consist of?
What is t type java?
Can we have 2 main methods in java class?
What is instance means in java?
What is an object's lock and which object's have locks in java programming?
What is tcp and udp?
Can you explain inner class.
Does garbage collection occur in permanent generation space in jvm?
How a variable is stored in memory?
What is tostring () method?
What is the difference between abstraction and encapsulation?
What is * argv?