1. Definition: The method is an executable code block with a name.
2. method declaration: the syntax for declaring a method includes the following five parts:
1. access permission modifier. This is an optional parameter. The default value is private access, that is, only internal access from the declared class is allowed.
2. Return type. If no value is returned, the return type is specified as void.
3. method name.
4. Parameters. Optional.
5. The method body consists of a pair of braces, which contains executable code.
3. The parameters of the method are declared in the parameter list of the method, and the parameters of the method are in the parameter list of the method call.
4. Call and return values of methods. To return values, the method must declare a return type before the method name. If the method does not return values, it must be declared as void.
5. Method overload: A class can have more than one method with the same name, which is called method overload ).