from velumurgans notes
-----------------------
widening coversion acepted,narrowing conversions rejected then how come
a 64 bit long fit's in a 32-bit float variable.
long ll = 64;
Float ff = ll; // legal???
Code -->
---------
class q20
{
public static void main(String[] args)
{
System.out.println("Hello World!");
q20 qq = new q20();
qq.callme(7l,7l,7l);
}
void callme(double d, float f, long i){
System.out.println("One");
}
void callme(float ff, double dd , long ll){
System.out.println("Two");
}
void callme(int ff, int dd , int ll){
System.out.println("Three");
}
}
After compilation-->
----------------
q20.java:7: Reference to callme is ambiguous.
It is defined in void callme(double, float, long)
and void callme(float, double, long).
Question -->
------------
According to me the o/p should have been "Two"