What restrictions are placed on the values of each case of a switch statement?

Q

What restrictions are placed on the values of each case of a switch statement?

✍: Guest

A

During compilation, the values of each case of a switch statement must evaluate to a value that can be promoted to an int value.

2012-12-04, 2363👍, 0💬