63.3k views
5 votes
A program contains a switch statement that lets you test the value of an expression and, depending on that value, to jump directly to some location within the switch statement. When compiling the program, when will a Java compiler report an error?

1 Answer

5 votes

It's a very vague question, but honestly the error could occur anywhere we want, just simply use throw or do division by zero in one of the cases etc.

Hope this helps.