Which one is TRUE about the program belona???
public class AmbiguousOverloading
public static void main(String) args) {
System.out.println(max(1, 2));
}
public static double max (int numl, double nun>
if (numl > num2)
return numi;
else
return num2;
]
public static double max (double nunl, int ruan)
if (numi > num2)
return numi;
else
return num2;
1)Complies without any errors
2)Syntax error
3)Compile error: ambiguous invocation
4)Compile error: you can't have two methods with the same name

Azimus19 Azimus19    1   20.12.2020 07:38    0

Другие вопросы по теме Информатика