1package test;
2
3/**
4 * @author The Elite Gentleman
5 *
6 */
7public enum Strings {
8 STRING_ONE("ONE"),
9 STRING_TWO("TWO")
10 ;
11
12 private final String text;
13
14 /**
15 * @param text
16 */
17 Strings(final String text) {
18 this.text = text;
19 }
20
21 /* (non-Javadoc)
22 * @see java.lang.Enum#toString()
23 */
24 @Override
25 public String toString() {
26 return text;
27 }
28}
1public static class Status
2{
3 public const string Awesome = "Awesome";
4 public const string Cool = "Cool";
5}
6//Not an enum but has a similar effect without needing to convert ints
7
1public enum EXIT_CODE {
2 A(104), B(203);
3
4 private int numVal;
5
6 EXIT_CODE(int numVal) {
7 this.numVal = numVal;
8 }
9
10 public int getNumVal() {
11 return numVal;
12 }
13}