This content has been marked as final. Show 2 replies
As declared asList can take an array or a list* of T's. Your alternativeOK, got it. I misinterpreted p. 69 of "Java in a Nutshell" which says, "Varargs methods are handled purely by the compiler. To the Java interpreter, the max() method is indistinguishable from [one declared with explicit array syntax for the last argument]. To convert a varargs signature to the 'real' signature, simply replace ... with ."
would limit the caller to using an array only.
* [Edit] I mean an argument list, not a List list...
Now I see that indistinguishable to the interpreter is not the same as indistinguishable to the compiler.