One of the roles for the switch statements is that they accept constants as arguments however observing the following code we can clearly notice a compilation error reported by the compiler at the marked line
public void testSwitch(final int y){
final int x= 0;
int tester = 9;
switch(tester){
case x:
break;
case y://compilation error here case constant must be constant expression
break;
}
}
is this related to what is called "Compile time" constants?