For example, a class include two methods,
public void find(Object id);
public void find(Object... ids);
When I invoking find(null), why jvm actually execute the last one?
In accepted answer of Calling Java varargs method with single null argument? we can read that
Java doesn't know what type it is supposed to be. It could be a null Object, or it could be a null Object array. For a single argument it assumes the latter."
but that still doesn't explain it. Can anyone provide some more information like from language specification?