I have one interface having three abstract methods.
public interface ThreeDemoInter {
public void a();
public void b();
public void c();
}
I have one parent class having the same three method:
public class ParentThree {
public void a(){
System.out.println("parent a");
}
public void b(){
System.out.println("parent b");
}
public void c(){
System.out.println("parent c");
}
}
and lastly one child class having two methods extending parent class and implementing the interface
public class ChildThree extends ParentThree implements ThreeDemoInter {
public void a(){
System.out.println("child a");
}
public void b(){
System.out.println("child b");
}
}
my concern is why not getting error of method c()
i know that it extending the parent class having this method but concept behind is not getting full clear. Thanks in advance. looking for explanation behind this code.
@Override public void c() { super.c(); }would have been needed.