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
2.1m questions
2.1m answers
60 comments
57.0k users