in real life, rice cookers can achieve the function of "cooking rice", but only if we have to provide ingredients. If we don't offer anything, it's really "paddle".
Java with parameters is a way to solve this kind of problem.
For example, in order to solve the calculation problem of calculating the average score of two subjects, we can define a method with parameters, and pass the method to pass the scores of the two courses.
A question that must not be overlooked:
1. When calling the parameter method, the number, type, and order of the arguments must be guaranteed to correspond to the parameter one by one.
2. When calling a method, the argument does not need to specify a data type
3, the parameters of the method can be basic data types, such as int, double, etc., can also be reference data type, such as String, array, etc.
4, when the method parameter has multiple, multiple parameters are separated by commas
Use of no return value method with parameters in Java