Hello, in python, when I need to call a delay action, I can use time.sleep(x). What is it in Java?
Thread.sleep() ? Thanks.
The sleep() method in the Thread class is a static method and has nothing to do with any Thread in particular; you can use it and it makes your curent fall to sleep. The method can be interrupted (not very likely) but you have to embed it in a try ... catch block.tony1812 wrote: ↑Fri Sep 28, 2018 10:21 amPlease don't give me the attitude. I did google it, I read the same post. but My little understanding is Thread.sleep() has something to do with a thread.. I am wondering if it can be applied to general purpose like time.sleep() in python.
I am not a genius like you. Java is brand new to me.