This is a compiler error, not an execution error. The error manifestation at compile time does not depend on the value of the expression in the parentheses of the if() statement.

(My setup: java...