Method overloading compiler error, ambiguous method call
<p>For the below code, I do understand that it makes sense to be ambiguous for the calling method to know which overloaded method to call however I am unable to understand how exactly the parameter matching is checked here.</p>

<pre><code>public class Test{
    public void m1(float i,int j){
        System.out.println("float method ");
    }

    public void m1(int i, float j){
        System.out.println("int method ");
    }

    public static void main(String[] args) {
        Test a=new Test();
        a.m1(10,10); // The method m1(float, int) is ambiguous for the type Test
    }
}
</code></pre>