Java - For a given function foo(X i); in Interface X, why can't implementing class Y change it to fo

Posted by incrediman on Stack Overflow See other posts from Stack Overflow or by incrediman
Published on 2010-03-30T18:31:07Z Indexed on 2010/03/30 18:33 UTC
Read the original article Hit count: 409

Filed under:
|
|

For example

public interface X{
    public void foo(X i);
}

public class Y implements X{//error: doesn't implement foo(X i)...
    public void foo(Y i){
        fooBar(foo);
    }
    ....
}

Why can't I do that?

© Stack Overflow or respective owner

Related posts about java

Related posts about interface