Java reuse mechanisms include override, overload, hide, and shadow.
Override overwrite. The subclass overwrites the same parameter method of the parent class.
Overload, similar methods with different parameters of the same name
Hide hiding means that the static method of the parent class is "hidden, so it is exempt from quilt overwriting". formally, the static method of the same name and parameter of the Parent and Child classes is hide; in principle, the static method does not belong to the object but belongs to the class, so there is no concept of inheritance. In terms of usage, the static method is called directly by class, and there is no polymorphism!
Shadow masking, for example, hiding variables with the same name in a method
The access control of Java is divided into four fields, which are very simple (listed in ascending order ):
Public Global Access
Protected inherits accessible
The default (that is, the domain is not explicitly specified) package can be accessed inside
Private class internal access
Child inheritance cannot "narrow down" the fields of the parent method. For example, the method of the parent protected class cannot overwrite the method of the quilt class "default", because the access domain of protected is considered to be greater than the "default"