It prints output from case 10:
but prints x=11
how? after which line it increments the value of x
int x = 10;
switch (x++) {
case 10:
System.out.println("case 1 ::: "+x);
break;
case 11:
System.out.println("case 2 ::: "+x);
break;
default:
System.out.println("default ::: "+x);
}
OUTPUT
case 1 ::: 11