public enum AccountType {
Cash("现金"),
DisCash("现金"),
Margin("转账"),
DisMargin("转账");
private String value;
private AccountType(String value) {
this.value = value;
}
public String getValue() {
return value;
}
public static void main(String[] args) {
System.out.println(AccountType.Cash.getValue());
if("现金".equals(AccountType.Cash.getValue())){
System.out.println("我用现金结账");
}
}
}