overloading primitive variables
<p>code is </p>

<pre><code>public class TestOverload {

    public static void print(Float f, double d) {
        System.out.println("Float,double");
    }

    public static void print(float f, double d) {
        System.out.println("float,double");
    }

    public static void print(int f, double d) {
        System.out.println("int,double");
    }
//  public static void print(int f, float d) {
//      System.out.println("int,float");
//  }

    public static void print(double d1, double d) {
        System.out.println("double,double");
    }

    public static void print(float d1, float d) {
        System.out.println("float,float");
    }

    public static void main(String[] args) {
        TestOverload.print(2, 3.0);

        TestOverload.print(2, 3.0f);//Compiler error:The method print(float, double) is ambiguous for the type TestOverload
    }
}
</code></pre>

<p>why it is giving error , instead it should pick print(float d1, float d)</p>

<p>PS:
in the above code,if i comment :</p>

<pre><code>//  public static void print(int f, double d) {
//      System.out.println("int,double");
//  }
</code></pre>

<p>then print(float d1, float d) is called...</p>
