I am not sure of the vocabulary I am using here, please correct me if I\'m wrong.
In Javascript, I had the following code:
let args = [1,2,3];
func
Unfortunately, you can't do this. The spread operator works in javascript because functions are allowed to accept two few (left out arguments are undefined) or too many arguments (extra arguments are ignored) of any type. Java, being strongly and statically typed, must always know exactly how many and what kind of arguments you are passing before you even compile the code.
You can probably find a hackaround with Java 8's functional interfaces, method references and var-args, but it would require so much boilerplate that I won't even bother posting it here.