@Override causes issues with class hierarchy involving interface, abstract class and concrete class

Posted by Nayn on Stack Overflow See other posts from Stack Overflow or by Nayn
Published on 2010-06-01T13:12:18Z Indexed on 2010/06/01 13:13 UTC
Read the original article Hit count: 149

Filed under:

Hi, My classes are as follows

public interface A {
    public void doSomething();
}
public abstract class B implements A {
    public void doOneMoreThing() {
        // Do one more thing
    }
}
public class C extends B {
    @Overrides                <---- Causes error
    public void doSomething() {
        // Do something
    }
}

Could somebody tell me, why this @Overrides annotation is causing error?

Thanks Nayn

© Stack Overflow or respective owner

Related posts about java