I don’t know why each time I implements a class. when I use @Override Eclipse always notice error:
the method A of type B must override a superclass method
(With method A is method that I override and B is the current class I work with)
And Eclipse recommend delete @Override
But with the same code, I work on Idea, no error found.
Who can tell me why,please.
thanks 🙂
@Edit: Oh, I don’t post exactly code because It happend for all when I implement sth:
for example:
public class helloworld implements Runnable {
@Override //this line no-error with Idea and error with eclipse:the method run of type helloworld must be override a super class
public void run(){
}
Java 5 only properly supports this annotation on methods you override when subclassing. Starting with Java 6 you can also use this annotation on methods that implement methods from an interface.