You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

UnderIfFalse.java 380B

1234567891011121314
  1. // modeled on jacks 16.2.7-final-4: A final variable
  2. // must be definitely unassigned if it
  3. // is to be assigned inside an if (false) block.
  4. // if false is no protection for evildoers
  5. public class UnderIfFalse {
  6. static int foo() { return 0; }
  7. static final int val = foo();
  8. public static void main(String[] args) {
  9. if (false) {
  10. val = 1;
  11. }
  12. }
  13. }