1. Overloading of methods:
The method name is the same, and the parameter list is called the overloaded method.
2. How to correctly differentiate the method is different:
1. See if the method name is the same, the method name is different method
2. See if the parameter list is the same. The differences in the parameter list are divided into two parts: a. The number of arguments is different B. The data type of the parameter is different.
Attention:
A. The overloads of the method are independent of the return value/modifier list.
B. If the method name is the same and the argument list is the same, then this method is duplicated and is an error.
3. How the method is executed:
The method does not call not execute, a call is executed, and the result of the call is returned to the method's call.
4. Calls from the memory data structure parsing method:
The method will not partition the method in memory when it is called, and if the method does not call it, it will not divide the space in memory.
method is called "stack", the end of the method is "stack".
Memory Brief Analysis:
Explanation of overloading of Java methods