void sum(5,5,5,6,7,8,9,3,5,3,2,3,6){}
won't even compile because it is not a valid method declaration
A method parameter list in parenthesis should be a comma-delimited list of input parameters, preceded by their data types, enclosed by parentheses.
2 & 3 are basically the same thing except if you will call the method sum(5,5,5);
it won't resolve to method void sum(int[] a ){}
because this method is expecting an int array
as an calle method argument whereas void sum(int... a){}
will work fine as it is expecting variable number of int
type arguments in method call.