直接上代码: 结果: 抛出了一个异常:IllegalMonitorStateException 去官方文档查看IllegalMonitorStateException类(是个Exception的子类)的信息: PS:链接: