1) Package:
1.1) Class: Encapsulates the properties and behavior of an object
1.2) Method: Encapsulation is the implementation of the specific business logic
1.3) Access control modifier: Encapsulated is access permission
2) Inheritance:
2.1) Function: Reuse of code
2.2) Parent class/base class: Common Properties and behaviors
Subclass/Derived classes: unique properties and behaviors
2.3) After the child inherits from the parent, the child has: Parent + child
2.4) transitive, single inheritance, multi-interface implementation
3) Polymorphism:
3.1) Meaning: Polymorphism of behavior, polymorphism of object
3.2) upward styling, forced type conversion, instanceof judgment
3.3) polymorphic forms of expression:
3.3.1) Rewrite: polymorphic according to Object
3.3.2) Overload: polymorphic According to parameters
Design Rules:
1) Abstract The attributes and behaviors common to all subclasses into the parent class
2) All sub-classes behave the same, designed as a common method
All subclasses behave differently and are designed as abstract methods
3) Abstract The behavior common to the partial subclasses into the port
Interface is used when compliance is both a principle
Interfaces are extensions to inherited uniqueness (multiple inheritance)
I am a beginner, if the update is not good, welcome the Great God pointed out, thank you!
More exciting after the update, reprinted annotated!
Java-three characteristics and design rules of object-oriented