Difference between double… and double[] in formal parameter type declaration
I have question: what is the difference between these two declarations? public static void printMax(double... numbers) { ... } public static void printmax(double numbers[]) { ... } Is double... numbers the same as double numbers[] ? polygenelubricants On varargs The Type... construct in method parameter declaration is commonly what is called varargs. In JLS, it's called the variable arity parameter. JLS 8.4.1 Format parameters The last formal parameter in a list is special; it may be a variable arity parameter, indicated by an elipsis following the type. If the last formal parameter is a