Today as i was coding , I just happened to write this piece of code
public void test(int i){
if(i > 1)
int z=5;
} |
For some reason, the compiler flags the above as error.
However the below works just fine…
public void test(int i){
if(i > 1) {
int z=5;
}
} |
Any idea here anyone??