I have a method which takes a variable length string (String...) as parameter. I have a List with me. How can I pass this to the method as argument?>
List
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.
String ...