Я читал, что если у вас есть что-то вроде следующего, оператор if будет удален:
Код: Выделить всё
static final boolean DEBUG = false;
if (DEBUG) System.out.println("Hello World!"); // will be removed
Код: Выделить всё
static final int VALUE = 3;
if (VALUE > 9) System.out.println("VALUE > 9 ???"); // will this be removed?
Код: Выделить всё
static final SomeEnum VALUE = SomeEnum.FOO;
if (VALUE==SomeEnum.BAR) System.out.println("Bar???"); // will this be removed?
Подробнее здесь: https://stackoverflow.com/questions/179 ... pabilities
Мобильная версия