public enum SeasonEnum {
SPRING("1","春天"),
SUMMER("2","夏天"),
AUTUMN("3","秋天"),
WINTER("4","冬天");
SeasonEnum(String key,String value){
this.key = key;
this.value = value;
}
private String key;
private String value;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
public class Test {
public static void main(String[] args) {
System.out.println(SeasonEnum.SPRING.getKey());
}
}