IntelliJ IDEA: “cannot resolve symbol” for String, System and other Java classes

Check the JDK configuration Classpath tab in Project Structure | SDKs:

JDK

Also check that project and modules use the same JDK.

If it’s empty, remove the JDK and add it again. It’s not recommended to use JetBrains Runtime as your JDK, download and configure some different standalone JDK instead, 2020.1 version can download JDK for you.

Important notice
The bundled JRE is used for running the IDE itself,
and it’s not sufficient for developing Java applications. Before you
start developing in Java, download and install a standalone JDK build.

Leave a Comment