About enums in switch Statements
antaow opened this issue · 0 comments
antaow commented
Bruce,
When I read your chapter on Enumerations, In the section of enums in switch Statements, original text:the compiler will complain if you don’t have a default—even if you’ve covered all the possible values of the enum.
The question is as follows:
when I don't use a default,my compiler doesn't give any error .
My java version is "17.0.1" 2021-10-19 LTS