In the following code , default case is written first so i think this will execute no matter the value of expression is .
But the output says something else.
here's the code
The default case is only chosen as 'entry' point if no other case matches the value of i independent of where the default case appears . So in the case of i = 10 the entry point is case 10:.