The following Java code does not compile.
int a = 0; if(a == 1) { int b = 0; } if(a == 1) { b = 1; }
Why? There can be no code pa
Because when b goes out of scope in the first if (a == 1) then it will be removed and no longer exists on the stack and therefore can not be used in the next if statement.