mrjayviper
mrjayviper

Reputation: 2388

How do I use the keyword "var" when declaring local variables?

I was searching the net for a way of declaring local variables and came across this Oracle page. The page talks about using the keyword "var".

I am using IntelliJ and I believe I correctly setup my project to use "var" but it's not working properly. Any ideas what I'm doing wrong?

In the project language level, I also tried 10 but no difference.


enter image description here

enter image description here

Upvotes: 0

Views: 73

Answers (1)

o_nvk
o_nvk

Reputation: 56

There is one more place that could be not turn on an appropriate feature

Please check Project bytecode version. It is placed on File -> Settings -> Build, Execution, Deployment -> Compiler -> Java Compiler

Project bytecode version

Upvotes: 2

Related Questions