The evolution of the program: process-oriented and object oriented
Process-oriented: Do not think how to do, while doing while watching
Object oriented: Think about what to do first, then do it again.
Modifiers (access rights)
| access Level
|
access control modifier |
homogeneous |
same package |
subclass |
< Span style= "font-family: Song body; Font-size:14px "> different packages
|
|
public |
|
√ |
√ |
√ |
√ |
|
protected |
|
√ |
√ |
√ |
-- |
|
default |
|
√ |
√ |
-- |
< strong>-- |
|
Private |
Private |
√ |
-- |
-- |
-- |
Object-oriented features
Encapsulation of
Not visible to external
Inherited
Features of the extended class
Polymorphic
Method overloads (the parent class has this method, the subclass overloads this method.) That is, the method name, return type, parameter type, and number are the same for the subclass and the parent class, and the polymorphism of the object
Java object-Oriented---object-oriented