(use -source 7 or higher to enable strings in switch) error;Netbeans 7.1.2

bsm picture bsm · Jun 20, 2012 · Viewed 15k times · Source

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

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

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

Need your help.
Thanks

Answer

jmj picture jmj · Jun 20, 2012

You need to set the source for your project,

right click > properties > source > set here