how to accept a variable number of parameters in main function 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
}