How to enable the Java keyword assert in Eclipse program-wise?

前端 未结 6 850
无人共我
无人共我 2020-11-27 05:44

How can I enable the assert keyword in Eclipse?

public class A
{
    public static void main(String ... args)
    {
        System.out.println(1         


        
6条回答
  •  一个人的身影
    2020-11-27 06:06

    To be specific:

    • Go to Run->run configuration
    • select java application in left nav pan.
    • right click and select New.
    • select Arguments tab
    • Add -ea in VM arguments.

    enter image description here

提交回复
热议问题