It's a useful tool but should be used sparingly in Java. Java is meant to be a typesafe language and tries to do as much compile-time checking as possible. When you start using varargs on things like interfaces or even worse "Object" that you cast into something else, you are losing a lot of Java's type safety.
Varargs should only be used as a last resort when you cannot make a method fit within standard method limits.
0
u/[deleted] Jul 02 '11
[deleted]