Search code examples
javaintellij-ideasystem

System.out.printf. Cannot resolve symbol 'out'


I am using IntelliJ IDEA to learn Java. All went well until yesterday when the mentioned error happened. I didn't make any changes. I was looking for the solution in the following ways:

  1. reboot the pc
  2. restart IntelliJ.

It keeps showing this error:

enter image description here


Solution

  • You have a class of your own named System.java and you are confusing the compiler (and yourself) with this, since the compiler thinks that out should be a static field of this class. Rename that class ASAP.