Skip to content

Instantly share code, notes, and snippets.

@wkdalsgh192
Created September 26, 2021 13:49
Show Gist options
  • Save wkdalsgh192/20de9012e9404206c90af7c487be693a to your computer and use it in GitHub Desktop.
Save wkdalsgh192/20de9012e9404206c90af7c487be693a to your computer and use it in GitHub Desktop.
interface Day {
int MONDAY = 1;
int TUESDAY = 2;
int WEDNESDAY = 3;
int THURSDAY = 4;
int FRIDAY = 5;
int SATURDAY = 6;
int SUNDAY = 7;
}
public class EnumExample3 {
public static void main(String[] args) {
int day = Day.MONDAY;
switch (day) {
case Day.MONDAY:
System.out.println("Mondays are bad");
break;
case Day.TUESDAY:
System.out.println("Tuesdays are still bad");
break;
case Day.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