public class Test {
    public static final int FOO = 0;
    public static final int BAR = 2;

    void foo(String[] args) {
        switch (args.length) {
            case FOO:
                break;
            case BAR:
                break;
        }
      }
}