I have a small problem in my code
I have 2 classes
public class A { public A foo(int a) {return new A();} } public class B extends A{ pu
Because B.foo and A.foo is different methods. If you want to override method A.foo, then method B.foo must return class A.