Today to do a face blindfolded, the original thought to understand a very deep, it seems not only to learn, change the use of flexible dressing. The following are the differences between the overloaded and rewritten collections:
1. First, write: Overload English for overload, override for override.
2. Then the definition: (1) The overload is defined as: The method name is the same, the parameter type is different or the parameter number is different or the parameter order is different, it can form the overload. Note here that there is no specified method return value and modifier to prevent trap AO.
(2) Overrides (also called overwrite or replication): The method name is the same, the return value type is the same, the parameter list is the same. Note here that there is no rule to modify Fuo.
3. Permissions: Overload does not require permission;
The overridden permission is: The method overridden by the quilt class cannot have more restrictive permissions than the parent class.
4. Scope: Overloads occur in a class, and overrides occur in inheriting classes.
5. Construction method: The construction method can be overloaded, but cannot be overridden. (Construction method cannot use return value)
The difference between overloading and overriding Java