Can subclass inherit interface implementation from parent unrelated to the interface
<p>This is kind of quirk or corner case. Consider this example:</p>

<pre><code>interface I {
    void foo();
}

class B {
    public void foo() {}
}

class C extends B implements I {}
</code></pre>

<p>With my compiler (OpenJDK in Linux) it compiles and the following works:</p>

<pre><code>I c = new C();
c.foo();
</code></pre>

<p>Why? Is it intentional and backed by the language standard? How the runtime knows to follow first "down" from <code>I</code> to <code>C</code> and then "up" from <code>C</code> to <code>B</code>? While that would be clear in case <code>B implements I</code>, it seems counter intuitive given <code>B</code> unrelated to <code>I</code>.</p>