Java面試基礎問題之(二十一)—— 線程持有的任何對象.wait()都會使線程陷入阻塞嗎

直接上代碼: 結果: 拋出了一個異常:IllegalMonitorStateException 去官方文檔查看IllegalMonitorStateException類(是個Exception的子類)的信息:   PS:鏈接:Class IllegalMonitorStateException 類說明:Thrown to indicate that a thread has attempted t
相關文章
相關標籤/搜索