Created
September 26, 2021 13:29
-
-
Save wkdalsgh192/3ac81c4d332dfdfa8cb53ea774c977dc 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 EnumExample2 { | |
private final static int MONDAY = 1; | |
private final static int TUESDAY = 2; | |
private final static int WEDNESDAY = 3; | |
private final static int THURSDAY = 4; | |
private final static int FRIDAY = 5; | |
private final static int SATURDAY = 6; | |
private final static int SUNDAY = 7; | |
public static void main(String[] args) { | |
int day = MONDAY; | |
switch (day) { | |
case MONDAY: | |
System.out.println("Mondays are bad"); | |
break; | |
case TUESDAY: | |
System.out.println("Tuesdays are still bad"); | |
break; | |
case WEDNESDAY: | |
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