(使用-source 7或更高版本来启用switch中的字符串)错误; Netbeans 7.1.2

(使用-source 7或更高版本来启用switch中的字符串)错误; Netbeans 7.1.2

问题描述:

我正在使用JDK 7和Netbeans IDE 7.1.2.通过在switch中使用字符串

I am using JDK 7 and Netbeans IDE 7.1.2. Going through Using string in switch

试图在我的IDE中编译该示例示例,但出现此错误.

Was trying to compile that sample example in my IDE but I am getting this error.

开关(month.toLowerCase()){ (使用-source 7或更高版本来启用switch中的字符串) 1个错误

switch (month.toLowerCase()) { (use -source 7 or higher to enable strings in switch) 1 error

需要您的帮助.
谢谢

Need your help.
Thanks

您需要设置项目的源代码

You need to set the source for your project,

右键单击>属性>源>在此处设置

right click > properties > source > set here