The method of type must override a superclass method

The method of type must override a superclass method

The method of type must override a superclass method

Remove @Override annotation

Solution: This problem occurs if you project still pointing lower version of java where @Override annotation is not supported. In my case it was pointing to JDK 1.5 version as shown below in eclipse:

The method of type must override a superclass method

  • I had to change latest version of JDK where @Override annotation supported. Its supported from JDK 1.6 but I had JDK 1.8 so I changed to my compiler and build version in below steps:
  • Right click project –> Properties –> Java Compiler –> Uncheck JDK compliance check box and change JDK version:

The method of type must override a superclass method

  • Then it match your Build path with same version as shown below:

The method of type must override a superclass method

The method of type must override a superclass method

The method of type must override a superclass method

  • That’s it.

For more information please visit Eclipse documentation here

Leave a Reply

Your email address will not be published. Required fields are marked *