I keep getting this error even though I have a 1.6+ version (I have 1.8), and i'm working with IntelliJ.
P.S. I have tried to update both, java jre and java jdk, didn't help!
File > Project Structure > Project Settings > Modules > your Module name > Sources > Language Level > choose the one which you need.
File
Project Structure
Project Settings
Modules
your Module name
Sources
Language Level
1.4m articles
1.4m replys
5 comments
57.0k users