how to create thread in java?
Answer Posted / gurpreet singh
there are two ways to creat the thread:
1. by implement Runnable interface
2. by extends Thread
NOW which one is batter apprach
implement Runnable Thread is batter apporach
because in inheritance does not allow its
class to extends more than one...
Where we use mutiple inheritance then we creat
a Thread by using implement runnable interface
that why its batter apporach
ok concept is understood.
Gurpreet singh
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Why is abstraction needed?
How do you achieve runtime polymorphism?
What is encapsulation example?
What is destructor in oop?
What is polymorphism and example?
what type of question are asked in thoughtworks pair programming round ?
What is polymorphism in oop example?
What is the real time example of inheritance?
What are the benefits of polymorphism?
IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?
What is difference between data abstraction and encapsulation?
What is meant by oops concept?
What is the point of oop?
What is abstraction oop?
What is the difference between static polymorphism and dynamic polymorphism?