I'm using JCommander in a project.
Its documentation defines its parse method to be like
parse
public void parse(String... args)
Parse and validate the command line parameters.
so, it accepts a variable number of individual String arguments (to my understanding.)
However, my args are currently stored in an array of strings,
public static void main(String[] args) {
CommandTemplate template = new CommandTemplate();
JCommander jc = new JCommander(template);
jc.parse(args); // <--- effectively what I'd like to accomplish.
}
String... argsis affectivly aString[] argsjust with the nuance of you beeing able to provide thearrayas seperate parameters as of("A","B"), but using(new String[] {"A", "B"})will just work as fine