1、首先在菜单栏点击run,然后点击Run Configurations 

图解eclipse开启断言assert

 

2、进入后看到操作页面如下

图解eclipse开启断言assert

 

3、点击Arguments页签

图解eclipse开启断言assert

4、 VM arguments文本框中加上断言开启的标志:-enableassertions 或者-ea 就可以了

图解eclipse开启断言assert

 

运行你的断言代码就可以看到效果了

 

相关文章:

  • 2022-02-13
  • 2021-05-25
  • 2021-09-02
  • 2022-12-23
猜你喜欢
  • 2021-05-17
  • 2021-05-14
  • 2021-05-12
  • 2021-09-30
  • 2022-12-23
  • 2021-04-08
相关资源
相似解决方案