I have a method with the following signature:
public void foo(String... params);
So all of these calls are valid:
foo("Peter", "John");
foo(new String[] { "Peter", "John" });
But why is this one not valid?
foo("Peter", new String[] { "John" });
From the docs:
You can’t pass an argument and an array.