switch 语句编译报错Constant expression required
问题:case语句后面必须是常量,使用final修饰,但是我已经用了final修饰了啊,怎么还会编译不过???
后来发现如下问题
常量之前是
public static final Integer QUESTIONNAIRE=2;
改成
public static final int QUESTIONNAIRE=2;
问题解决
switch 语句编译报错Constant expression required
问题:case语句后面必须是常量,使用final修饰,但是我已经用了final修饰了啊,怎么还会编译不过???
后来发现如下问题
常量之前是
public static final Integer QUESTIONNAIRE=2;
改成
public static final int QUESTIONNAIRE=2;
问题解决