我们还是通过源代码和代码注释来学习这个问题
我们先来看看wait方法的注释,这里截取最根源的native方法给的注释
Causes the current thread to wait until either another thread invokes the notify() method ...
wait(),notify()和notifyall()都是java.lang.object的方法:wait(): causes the current thread to wait until another thread invokes the notify() method or the notifyall() method for this obj...