How to enable assertions?

后端 未结 1 597
攒了一身酷
攒了一身酷 2021-01-12 11:19

In my online Java programming class I have to write a program where the user enters their age, and checks if it\'s between 0 and 125 - if it isn\'t, it shows an error code,

1条回答
  •  星月不相逢
    2021-01-12 12:01

    java -ea should do it on the command prompt.

    You can try the following for intellJ and eclipse respectively.

    0 讨论(0)
提交回复
热议问题