Is this functionality going to be put into a later Java version?
Can someone explain why I can\'t do this, as in, the technical way Java\'s switch state
Switches based on integers can be optimized to very efficent code. Switches based on other data type can only be compiled to a series of if() statements.
For that reason C & C++ only allow switches on integer types, since it was pointless with other types.
The designers of C# decided that the style was important, even if there was no advantage.
The designers of Java apparently thought like the designers of C.