All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.
The "must return a value" is applicable only when the expression evaluation is completed normally. In case of an exception, the expression does not complete normally.
It is like saying a method whose return type is String must return a String. But the following method will compile even though it does not return a String:
String m(){
if(true) throw new RuntimeException();
}
But your point is valid, the option should mention this possibility to be correct. Will update.
No, a switch expression cannot return void. It is not an expression in that case, it is a switch statement. Please go through the detailed explanation provided at the bottom of the question. It explains the difference between a switch statement and a switch expression.