Interface type of refence running the child class method which is not defined in the interface
<p>I've a code:</p>

<pre><code>interface My {
    //this is left empty
}

class Test implements My {
    public static void main(String[] args){
        My m=new Test();
        String str=m.toString();    //how reference variable m calls toString() in Test even it is not in My?
        System.out.println(str);
        str=m.show();    //Error:
        System.out.println(str);
    }

    public String toString(){
        return "Hello";
    }

    public String show(){
        return "World";
    }
}
</code></pre>

<p>The error at <code>str=m.show()</code> is <code>cannot find symbol str=m.show()</code> and <code>location: variable m of type My</code>.</p>

<p>My question is how the <code>m.toString()</code> does not report any error but <code>m.show()</code> report such error.</p>
