public static void main(String[] args) {
System.out.println(fun(2,3,4));
}
static int fun(int a,int b,int c)
{
return 1;
}
static int
This behaviour allows the resolution of two overloaded variable argument calls:
addStates(String... states)
addStates(Enum... states)
Calling addStates() gives a compile ambiguity problem. Adding in a third method:
addStates(){
addStates(new String[0]);
}
This allows selection selecting the more specific third addStates() to resolve the ambiguity problem of being unsure which of the variable type parameter methods to call.