An array of Strings vs String Varargs
<p>What is the difference between <code>void method(String[] a)</code> and <code>void method(String... a)</code>?</p>

<p>The first method take an array of Strings where as the second method takes one or more String arguments. What are the different features that they provide?</p>

<p>Moreover, don't know why but this is working:</p>

<pre><code>public class Test {

    public static void main(String[] args) {
        String[] a = {"Hello", "World"};
        Test t = new Test();
        t.method(a);
    }

    void method(String...args) {
        System.out.println("Varargs");        // prints Varargs 
    }
}
</code></pre>