The three dots (...) are used in a function’s declaration as a parameter. These dots allow zero to multiple arguments to be passed when the function is called. The three dots are also known as var args(variable arguments).Varargs are very helpful if you don't know how many arguments you will have to pass in the method.
The three dots (
...
) are used in a function’s declaration as a parameter. These dots allow zero to multiple arguments to be passed when the function is called. The three dots are also known asvar args(variable arguments).
Varargs are very helpful if you don't know how many arguments you will have to pass in the method.