1. Encapsulation
Hiding the state information of an object inside an object does not allow the external program to access the information inside the object directly, but rather through the methods provided by the class to implement operations and access to internal information, that is, the set and get methods.
There are two main meanings:
(1) Hide the hidden.
(2) exposing the exposure.
2. Inheritance
Subclasses inherit the behavior of the parent class.
3. polymorphic
There are two types of polymorphism in Java: Edit-time polymorphism and run-time polymorphism.
The polymorphism of the edits can be reflected in the overloads of the method. A method name can have different methods of entry, the method body is not the same, depending on the situation to achieve.
Run-time polymorphism means that the program can select multiple running states. A reference to the parent class of the child class. Upward transformation.
A is the parent B is the child
A a1=new b ();
This allows A1 to access only the methods and properties that are already in the parent class
And if the method that overrides the parent class in B must be executed, the method body of the subclass is used.
This is also the most important polymorphic explanation.
What is commonly said in Java encapsulation, inheritance, polymorphism