[HD-OCP17/21-Fundamentals Pg 293, Sec. 12.3.4 - using-switch-with-enums]
Posted: Wed Sep 25, 2024 3:42 am
case MONDAY: TUESDEY: System.out.println("MON/TUE"); break;
-> "TUESDAY" not "TUESDEY"
because below you mention nothing about this "TUESDEY"
"Now, for TUESDAY, do you see a matching case? No. TUESDAY: is not a case statement. TUESDAY is just a label applied to the print statement."
-> "TUESDAY" not "TUESDEY"
because below you mention nothing about this "TUESDEY"
"Now, for TUESDAY, do you see a matching case? No. TUESDAY: is not a case statement. TUESDAY is just a label applied to the print statement."