I'm coming from a C(++) background and my main interest in Java is Android development. To me this seems like an obvious question yet I haven't found it addressed anywhere (and I did search stackoverflow and google it). What I did find was lots of comments such as:
public String foo(String key, Object[] parameters) {..}
and
public String foo(String key, Object... parameters) {..}
are equal
In fact, the java docs for "Varargs" explicitly states "The three periods after the final parameter's type indicate that the final argument may be passed as an array or as a sequence of arguments"
The justification most often stated, from the same source, is that varargs have "Important uses in core APIs include reflection, message formatting, and the new printf facility."
Given that Java is object oriented, includes garbage collection and supports dynamic arrays AND Java varargs are limited to a single type, whats the advantage? (In contrast to, for example, C where they implement added functionality.)