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
Can we have more than one package statement in source file ?
What is the synchronized method modifier?
What is the difference between yield() and sleep()?
How listener identify that the event came from a particular object?
How a string is stored in memory?
What is variable explain with example?
How would you dynamically allocate memory to an array?
How do you implement singleton class?
What is module in oop?
placement papaers of spring computing technology
In case of inheritance what is the execution order of constructor and destructor?
What are actual parameters?
Can constructor be static or final?
How to retrieve data from database in java using arraylist?
What is a local class in java?