Chances are your methods aren't always going to be as simple as GenerateCharacter(). In order to pass in additional information, we'll need to define parameters that our method can accept and work with. Every method parameter is an instruction and needs to have two things:
- An explicit type
- A unique name
Does this sound familiar? Method parameters are essentially stripped-down variable declarations and perform the same function. Each parameter acts like a local variable, only accessible inside their specific method.
You can have as many parameters as you need. Whether writing your own custom methods or using built-in ones, the parameters that are defined are what the method requires to perform its specified task.
Assigning arguments
If parameters are the blueprint for the types of values a method can accept, then arguments are the values...