1public enum AlertLevel {
2 Undefined(0),
3 Ok(1),
4 Warning(2),
5 Alarm(3);
6}
1public class DaysOfTheWeek {
2
3 public enum Days {m, t, w, r, f, sat, s};
4 public static void main(String[] args) {
5 Days d = Days.t;
6 System.out.println(d);
7 //the output would be t
8 }
9}