javac code elimination capabilities
问题 I'm having a hard time finding information about javac 's code elimination capabilities: I read that if you have something like the following, the if -statement will be eliminated: static final boolean DEBUG = false; if (DEBUG) System.out.println("Hello World!"); // will be removed But how about this, for example: static final int VALUE = 3; if (VALUE > 9) System.out.println("VALUE > 9 ???"); // will this be removed? Or this: static final SomeEnum VALUE = SomeEnum.FOO; if (VALUE==SomeEnum.BAR