根据以下内容创建java枚举,枚举类名为ORDER_TYPE,枚举包含code和name两个熟悉
时间: 2024-05-25 14:19:30 浏览: 28
public enum ORDER_TYPE {
BUY("01", "买入"),
SELL("02", "卖出"),
CANCEL("03", "撤单"),
MODIFY("04", "修改");
private String code;
private String name;
private ORDER_TYPE(String code, String name) {
this.code = code;
this.name = name;
}
public String getCode() {
return code;
}
public String getName() {
return name;
}
}
阅读全文