howt to take an arbitrary numbe of parameters java code example
Example: java take arbitrary number of arguments
// In order to define vararg, ... (three dots) is used in the formal
// parameter of a method. This essentially creates an array.
accessModifier methodName(datatype… arg) {
// method body
}