Hello everybody,
I got this code from some mock exam cant remeber the name
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).
Can anyon explain me why is the problem
Yogesh