0

So thread has only two methods? run and start?

24th Jul 2016, 2:22 PM
Anoop E
Anoop E - avatar
5 ответов
+ 1
There's also setDeamon it has to be used before start () it tells the program that the thread is only a supplier that is useless when the rest stops so it doesnt block shutting down the programm... kind of...
26th Jul 2016, 3:17 PM
No One
No One - avatar
+ 1
sleep(), setPriority(), start(), wait(), run(), stop() etc. All these methods can be used while working with Threads :)
29th Jul 2016, 4:56 AM
Avnish Dixit
Avnish Dixit - avatar
+ 1
You have already gotten some great answers, but I just want to add that the Java Documentation is a great tool to learn even more about the methods in Thread and what they do. https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#method.summary
8th Oct 2016, 9:00 AM
Christopher
0
run(),start(),sleep(),wait()etc
29th Jul 2016, 12:56 PM
vinoth
- 2
no their three method start , run, stop
26th Jul 2016, 2:31 PM
Durgesh Birla
Durgesh Birla - avatar