Question: Which expressions about enums used in switch statements are correct? (Choose two.) A. The name of the enum type must not be used in each
Which expressions about enums used in switch statements are correct? (Choose two.)
A. The name of the enum type must not be used in each case statement.
B. A switch statement that takes a enum value may not use ordinal() numbers as case statement matching values.
C. The name of the enum type must be used in each case statement.
D. Every value of the enum must be present in a case statement.
E. A switch statement that takes a enum value can use ordinal() numbers as case statement matching values.
F. Every value of the enum must be present in a case statement unless a default branch is provided.
Step by Step Solution
3.28 Rating (163 Votes )
There are 3 Steps involved in it
The questions here revolve around the usage of enums in switch statements in Java The correct answer... View full answer
Get step-by-step solutions from verified subject matter experts
