Valid main method signatures in Java1 year ago

The commonly used main method signature is

    public static void main(String[] args) {

}

But from Java SE 5.0 onwards we can also use the varargs as given below.

    public static void main(String... args) {

}

The three dots indicates varargs (Variable arguments). You can use a varargs variable like an Array.
As an example when the following program is given Skill Rack as input, it prints Rack (which is the second argument. As index starts from 0, index 1 denotes second argument).

public class Hello {

public static void main(String... args) {
System.out.println(args[1]);
}
}