In this code
you are overloading the methods with the same name
so the compiler is unable to search for that specific method
and don't use dot(..) in the method arguments .
class Test
{
void A(int a){
System.out.println("in int");
}
void A(float a){
System.out.println("in float");
}
void A(double a){
System.out.println("in double");
}
public static void main(
String[]args)
{
Test a=new Test();
a.A(7);
}
}
copy and run it