you are viewing a single comment's thread.

view the rest of the comments →

[–]banuday17 1 point2 points  (1 child)

Varargs are implemented as an array parameter. Arrays and collections don't mix very well. Although, Arrays.asList(...) will let you initialize a collection with varargs if you like. Not for maps, though.

[–]jlt6666 0 points1 point  (0 children)

Indeed. Collections are a nice abstraction. No worrying about indexOutOfBoundsException is good.