Intellij IDEA运行前不检查其他类的错误

问题描述

这里写图片描述

MainClass为要运行的正常类,目录下存在一个类ErrorClass有错误,运行MainClass时会无法运行。 现在需要忽略ErrorClass中的错误,执行MainClass中的代码。

解决方法

第一步

这里写图片描述

第二步

在工具栏选择 , Run Configurations 
这里写图片描述

设置在运行前不检查错误 
这里写图片描述

单元测试注意事项:

扫描二维码关注公众号,回复: 106554 查看本文章

返回值必须为 void,不能为静态方法

猜你喜欢

转载自www.cnblogs.com/kinome/p/8986900.html