How to change Java JDK Version of IntelliJ IDEA.

Open IntelliJ IDEA. Then from top menu click File>Project Structure

Then you can change the values.

To see the changes are applied, you can create a class file in the project and run below code.

The output is

My Java version is — 18.0.2+9–61

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store