Skip to content

Instantly share code, notes, and snippets.

@wkdalsgh192
Created September 26, 2021 13:29
Show Gist options
  • Save wkdalsgh192/3ac81c4d332dfdfa8cb53ea774c977dc to your computer and use it in GitHub Desktop.
Save wkdalsgh192/3ac81c4d332dfdfa8cb53ea774c977dc to your computer and use it in GitHub Desktop.
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