DEVFYI - Developer Resource - FYI

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

Java Interview Questions and Answers (part 2)


(Continued from previous question...)

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

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

(Continued on next question...)

Other Interview Questions