-1

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

Hovercraft Full Of Eels
  • 283,665
  • 25
  • 256
  • 373
destructor
  • 41
  • 5
  • Please post code here as text. In particular, create a [mcve] which duplicates the error. – Code-Apprentice Apr 14 '22 at 17:31
  • 1
    @Code-Apprentice: agree, however that image also shows the presence of a System.java class, so in this instance, a picture did help solve the problem. Regardless, the question should probably be closed though as a typo/trivial error. – Hovercraft Full Of Eels Apr 14 '22 at 17:32

1 Answers1

2

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.

Hovercraft Full Of Eels
  • 283,665
  • 25
  • 256
  • 373