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
you have declared b variable inside if block that is not accessible out side the if block and if you want to access then put outside if block