Solution to error reporting in Java @ override

 
Sometimes when the eclipse project of Java is compiled on a different computer, the @ override always reports an error. Just remove the @ override, but it can’t fundamentally solve the problem, because sometimes there are too many @ override places.

This is a problem with JDK. We already have @ override for jdk5, but we don’t support the implementation of the interface. We think it’s not override and report an error. JDK6 fixed this bug. You can add @ override to both the method coverage of the parent class and the implementation of the interface.

To solve this problem, first make sure that JDK 1.6 is installed on the machine,

Then, select the eclipse menu windows – & gt; Preferences–> java-> Compiler–> Select 1.6 for compiler compliance level, refresh the project and recompile.

If the problem is not solved, right-click the project that reported the error and select properties — & gt; Java Compiler–> Select 1.6 from compiler compliance level to refresh the project and recompile.

 

Read More: