如下的常量类:
public class MsgConstant {
/**
* 医生APP显示名字
*/
public static final String DOCTOR_APP_NAME = "纳里医生";
/**
* 患者APP显示名字
*/
public static final String PATIENT_APP_NAME = "纳里健康";
/**
* 客服电话
*/
public static final String CUSTOMER_TEL="0571-89911667";
/**
* 短信推广语
*/
public static final String PROMPT_APPOINT="appoint";
public static final String PROMPT_REPORT="report";
/**
* 推广的客户端(微信、支付宝、app)
*/
public static final String PROMPT_CLIENT_WECHAT="wechat";
public static final String PROMPT_CLIENT_ALIPAY="alipay";
public static final String PROMPT_CLIENT_APP="app";
public static void main(String[] args) {
Class clazz=MsgConstant.class;
Field[] fields=clazz.getFields();
System.out.println("该常量类中有:"+fields.length+"个常量");
}
}