打开-ea开关是为了断言时候用的,下面介绍断言: idea中开启-ea: 在Run > Edit Configurations>选中当前类 > Configuration > VM options: 运行结果: