Reading isn't free. The cost is opening your mind to a new perspective.

2014-11-13

Level Up - Java: What is Vararg?

I like to remember vararg as "variable-length arguments". You may see them parameterized as "foo(Object... objects)" or "foo(int... ints)" or maybe "main(String... args)". The triple-dot signifies the vararg, and the method that has them uses it as an array.