Method parameters are formally declared variables used to communicate between a program and the method it calls. They allow a method to receive a value from its calling program.
Pattern:
where:returnType methodName(parameterDeclarations) { statements }
void
if the method does not return a value;
As an example, consider the the following definition of a
computeDistance()
method, which declares four parameters that it uses to work with the x-y coordinates of two
points it receives from its calling program.