When a block of code is unreachable at compile time, will the compiler remove it? Example:
final boolean DO_THAT = false;
if (DO_THAT) {
// code...
}
IIRC from the earlier thread about this, there are two scenarios:
1 - the final flag is in the same class. In this case, by definition, the compiler removes the relevant code.
2 - the final flag is in a different class; nothing happens (because the "other class" could be recoded and recompiled at any time, invalidating the assumption).
Basically, "final" has no meaning outside of the class file it's defined in?