Hey thanks you guys for responses.
According to Ilja
(1)A is not substitutable by myA(A is a super type not a sub type of myA).
(2)myA is substitutable by A(myA is a sub type of A).
I tried to
test second rule of substitution. Here's the code:
interface A{
void a();
}
-----------------
class myA implements A
{
public void a() {}
}
-----------------------
interface B{
void b(myA a);
}
--------------------------
class myB implements B{
public void b(A a) {
}
}
The news is I'm still having the error:
myB is not abstract and does not override abstract method b(myA) in B