I'm working with IntelliJ 14.1.4 and Java SDK 1.8. I've created an Enum but IntelliJ is not recognizing the code and it's showing the following error:
'class' os 'interface' expected

Are enum not supported by IntelliJ???
The issue is solved configuring a correct language level. In the case of enums, as enums are available since Java 1.5, the language level should be at least 5.
To configure the language level in IntelliJ go to File > Project Structure > Project Settings > Project > Project language level To ensure the chagnes are applied, restart IntelliJ, although in my case it wasn't necessary

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With