编译报错,Cannot switch on a value of type String for source level below 1.7. Only convertible int values or enum constants are permitted
jdk安装的是1.7的,为什么还报这样的错误,求解
MyEclipse 报错:(虽然有显示乱码,但是已经把项目那些设置成UTF-8格式的了)
An error occurred at line: 160 in the jsp file: /module/tool/hsCode/detail.jsp
Cannot switch on a value of type String for source level below 1.7. Only convertible int values or enum constants are permitted
157: <%
158: for(char c: code.getInspection().trim().toCharArray()){
159: String key = String.valueOf(c);
160: switch(key){
161: case "M":
162: out.println("杩涘彛鍟嗗搧妫?獙");
163: break;
Stacktrace: