The role of---function---
Code to implement a specific function--a way to reuse code
The format of the---function---
The access modifier returns a value type function name (parameter list) {statement;}
Parameter list contains the parameter's type and parameter name (parameter list to note order)
---details about the function---
1. Methods are only invoked to be executed, methods can only be called in methods, methods cannot be defined
2. The level of the function is a sibling
3. The entrance to the program is the main function
4. The return value of the function is given to the caller for processing by the caller
5. The return value of the function is independent of the parameter type
6.return+ return value type, or no return value return;--function call ends
7. The stack space is freed after the function call ends
---How to define the function according to the requirements of two explicit----
1. Result of function---return value type
2. Whether unknown content is required to participate in the implementation of the function---is the parameter list
---compiler and JVM's respective responsibilities---
Compiler---does not check for content other than syntax
JVM---Start running programs, allocate appropriate memory, etc.
---function overloading---
Allows a function of the same name to exist with a different argument list in the same class, distinguishing different functions from the argument list.
Advantages: Easy to read and optimize program design
---The learning---about functions
The practice is the requirement analysis, must carry on the necessary practice
Java Basics Summary-Methods (functions)