public class aman {
void m(double a , int b, int c) {
System.out.println(\"second\");
}
void m(float a , int b, double c) {
System.out.pr
here , method will be ambiguous becs you are filling all parameters as integer values, then the compiler will confuse (for automatic type cast). thus you need to define something like this suffix for your code:
public class aman {
void m(double a , int b, int c) {
System.out.println("second");
}
void m(float a , int b, double c) {
System.out.println("first");
}
public static void main(String[] args) {
aman obj = new aman();
obj.m(20d, 30, 40);//for calling first method
obj.m(23f, 12, 1d);//for calling second method.
}
}