I have an abstract class A, and an abstract class B inheriting A. Then, I have a class C(not abstract) that inherits B.
I need to override some methods declared abstract in A, and not implemented in B to be implemented in C.
But when I try to do this, and add an Override annotation on top of my method, it says its not valid as that method does not exist in the parent.
How can I do this?
Code with signatures:
public abstract class A {
abstract protected EntityType getEntityType();
abstract protected ActionResponse doProcessing();
}
public abstract class B extends A {
@Override
EntityType getEntityType() {
....
...
}
}
public class C extends B {
@Override
ActionResponse doProcessing() {
...
..
}
}