开启assert的支持

public class Assert {

    public static void notNull() {
        assert 1 != 1;
        String name = "jianglei";
    }
}
java -ea Assert

Idea开启assert

results matching ""

    No results matching ""