int param1 = 1;
switch (param1){
case 0:
int block2 = 10; // if this line is commented gives a compilation error
System.out.println(block2);
break;
case 1:
block2 = 5; // if this line is commented below line gives a compilation error
System.out.println(block2);
break;
default:
// System.out.println(block2); // comilation error
}
I try debug and dont makes sence because I dont see the declaration of the variable. this code run in a main