0
So thread has only two methods? run and start?
5 Answers
+ 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...
+ 1
sleep(), setPriority(), start(), wait(), run(), stop() etc. All these methods can be used while working with Threads :)
+ 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
0
run(),start(),sleep(),wait()etc
- 2
no their three method start , run, stop