Extends, implements, abstract and interface
Extends: inheritance, which corresponds to a class, cannot inherit two parents at the same time, just as a man cannot be two fathers at the same time.
corresponding to the interface, an object can be combined with multiple interfaces, just as a car is a combination of engine, wheel, etc.
Interface: interfaces, interfaces cannot be used directly, must be implemented before they can be used, cannot be inherited, and the methods inside the interface are abstract methods.
Implements: implementation, for the implementation of interface, interface must be implemented in order to use, just like the host mouse interface, you must implement the mouse to docking on the interface to use.
Abstract: Abstraction, abstract class is a kind of class, but must through subclass to implement abstract method, like bird is an abstract class, must inherit the bird as Eagle, Sparrow class or chicken class can be manifested.
Abstract methods, the same needs to be described in detail before the method can be used.
Override and Overload
Override: Override, override the method of the parent class, the parameter list of the method is consistent, the return type is consistent, and the method content is changed.
Overload: Overloads, that is, the same class, the method name, the parameters must be different, the return type can be different or the same.
Polymorphic:
Polymorphism is the same approach, with different implementations on different objects. Implemented by inheriting and overriding methods, and then pointing to the various child objects with references to the parent class.
Java object-oriented features description