I prefer using a map to a switch in most cases.
if (actionMap.contains(choice)) {
Action a = actionMap.get(choice);
a.execute();
} else {
//do something else
}
But in cases where the choices are too complicated to turn into a map or when multiple actions might be taken a switch is better.
switch (choice) {
case 1: actionOne(); break;
case 2: if(actionOne()) {actionTwo()}; break;
case 3: if(!actionOne() && (actionTwo() > 1)) {actionThree()}; result = 7;break;
default: result = actionTwo();
}
Sadly, sometimes requirements are complicated. Switch is useful in those cases where is simplified version of nested if/else constrcts.