is there a best practice for when to use arrays/lists/varargs as parameters?
r
Ruckus
12/30/2018, 1:13 AM
General rule of thumb I go by is to use varargs when you want a variable number of arguments, lists when you want a collection of arguments, and arrays when you specifically want arrays (if you don't know, use a list).
👍 1
e
egorand
12/30/2018, 2:07 AM
also, go with lists (or arrays) if you want named arguments - using named args with varargs is super awkward, as you’d have to wrap them with an