I am just wondering why Java 7 switch statement does not support null case and instead throws NPE ?
see commented line below (example taken from http://docs.oracle.com/javase/tutorial/java/nutsandbolts/switch.html )
switch (month) {
case "january":
monthNumber = 1;
break;
case "february":
monthNumber = 2;
break;
case "march":
monthNumber = 3;
break;
//case null:
default:
monthNumber = 0;
break;
}
return monthNumber;
}
This would have avoided an `if` condition from every `switch` use