Java5 Before switch(expR), expR can be only byte, short, char, or int.

Since Java 5, enumerated types have been introduced in Java. Expr can also be enum types.

As of Java 7, expr can also be a String, but long integers are not allowed in all current versions.