Use of interface as parameter type in java
<p>Consider the example below. </p>

<p>Why is it so that I'm not allowed to use <em>BImpl</em> as a parameter type of method <em>doSomething3</em>? When I say "not allowed to", I mean that Eclipse is complaining that the doSomething3-method from the interface <em>AInf</em> is not implemented.</p>

<pre><code>interface AInf
{
    AInf doSomething();
    BInf doSomething2();
    void doSomething3(BInf param);
}


interface BInf
{

}

class AImpl implements AInf
{

    @Override
    public AImpl doSomething() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public BImpl doSomething2() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public void doSomething3(BImpl param) // This method is not overriding the doSomething3(BInf param) from the AInf
    {
        // TODO Auto-generated method stub
    }
}

class BImpl implements BInf
{

}
</code></pre>
