标签:
public class MyEnum {
private final String name;
public static final MyEnum red = new MyEnum("红色");
public static final MyEnum green = new MyEnum("绿色");
public static final MyEnum black = new MyEnum("黑色");
public static final MyEnum yellow = new MyEnum("黄色");
public MyEnum(String name){
this.name = name;
}
public String getName(){
return this.name;
}
}
标签:
原文地址:http://www.cnblogs.com/jianbo-su/p/5845610.html