Autumn Road 3 strokes: overloading, rewrite

Overload

The same class, the same method name,
parameter type, the order type, the return value, the return value may be different types.

Rewrite

It occurred in the child-parent class, method name, parameter name parameter list must be the same.
Returns the parent class range less than or equal, or less thrown parent range.
Greater than or equal access modifier parent class.

The constructor can not be rewritten, but can be overloaded.

Guess you like

Origin www.cnblogs.com/whyaza/p/12320988.html