java.lang.Thread.sleep()方法和java.lang.Object.wait()方法之間的區別

java.lang.Thread.sleep():java sleep()方法爲Thread類定義的靜態方法,所以須要經過Thread類調用該方法:app Thread.sleep(1000); Javadoc對該方法的描述以下:less Causes the currently executing thread to sleep (temporarily cease execution) for
相關文章
相關標籤/搜索