Java 1.7 still telling me that strings in switch statements are incompatible -


i'm using java 1.7 in intellij , it's giving me compile error if i'm using pre-1.7. saying, "incompatible type. found 'java.lang.string'. required 'byte, char, short, or int'.

i'm rattling brain trying figure out why is. thanks

you need change language level in ide.

check these settings:

  • file > project structure > project > project sdk
  • file > project structure > project > project language level
  • file > project structure > modules > module > sources > language level
  • file > project structure > modules > module > dependencies > module sdk

also check compiler settings. adds arguments compiler:

  • file > settings > compiler > java compiler > byte code version

if use maven plugin enable auto-import. language level detected automatically pom.xml settings.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -