摘要:
原文地址:[转载]Javayield()sleep()wait()区别作者:wan_sheng520首先,wait()和notify(),notifyAll()是Object类的方法,sleep()和yield()是Thread类的方法。(1).常用的wait方法有wait()和wait(long timeout):void wait() 在其他线程调用此对象的 notify() 方法或 notifyAll() 方法前,导致当前线程等待。void wait(long timeout) 在其他线程调用此对象的 notify() 方法或 notifyAll() 方法,或者超过指定的时间量前,导致当 阅读全文
posted @ 2012-06-05 15:11
最近有点小胖
阅读(1516)
评论(0)
推荐(0)

浙公网安备 33010602011771号