Declaring parameters A method that accepts parameters must list the parameters in the method declaration. The parameters are placed in a parameter list inside the parentheses that follow the method name . For each parameter used by the method, you list the parameter type followed by the parameter name.
Read moreWhat does 3 dots mean in Java?
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 .
Read more