How to convert a List to variable argument parameter java
String...
equals a String[]
So just convert your list
to a String[]
and you should be fine.
String ... and String[] are identical If you convert your list to array.
using
Foo[] array = list.toArray(new Foo[list.size()]);
or
Foo[] array = new Foo[list.size()];
list.toArray(array);
then use that array as String ...
argument to function.