enum使用

2024/4/21 3:01:28

enum的使用

1,声明并定义自己需要的enum,比如: private enum titleType{DKD,INVEST,ACCOUNT,MORE } 2,在需要的地方使用switch--case进行判断,比如 private void initTitle(String string,titleType type){switch(type){case DKD:break;case INVEST:break;case AC…