Created
September 26, 2021 03:26
-
-
Save wkdalsgh192/8259ad02d20eb9d5c056548b7a969dff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EnumExample1 { | |
public static void main(String[] args) { | |
/* | |
* Monday == 1 | |
* Tuesday == 2 | |
* Wednesday == 3 | |
* Thursday == 4 | |
* ... | |
* Sunday == 7 | |
* */ | |
int day = 1; | |
switch (day) { | |
case 1: | |
System.out.println("Mondays are bad"); | |
break; | |
case 2: | |
System.out.println("Tuesdays are still bad"); | |
break; | |
case 3: | |
System.out.println("Wednesdays are so-so"); | |
break; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment