Coding using Java7 String switch case style..

I am new to IntelliJ and I am Coding using Java7 String switch case style.. if I go to build the project I am getting the following error.. how can I fix this...


java: strings in switch are not supported in -source 1.6  (use -source 7 or higher to enable strings in switch)

1 comment
  1. File > Project Structure... (or just hit F4 in "Project" view)
  2. Select "Project" from the list on the left side.
  3. Switch "Project language level" to 7.0.


PS. If you have language level set to 6.0, 7.0 string based switch should be marked (along with any other 7.0 "things") as an error (red underscore) in editor.

0

Please sign in to leave a comment.