Javaoo
Packaging
The composition of the class
Property
Method
The hiding of information
Four access modifiers
Private
Private permissions, which are accessible only in this class
Default
Default permissions, accessible only in the same package class
Protected
Protected permissions can only be accessed in the same package class or subclass of a different package class
Public
Public permissions, accessible from all locations
Implementation of the method
Must have a public non-parametric construct
Must have a private property provided by the Get/set method that conforms to the naming convention
Inherited
Must be a relationship
Inheritance in keyword Extands,java is a single-inheritance structure
One subclass has and only one parent class
Construction methods are not inherited
In the Java bottom, is the memory overlay method implementation
Subclass Object = Parent Class object Part + Subclass Object part
ToString: Returns a description of an object string. The output is: class name @ Reference address
equals: Determines whether the two objects are business equal (overriding method)
Finalize: Destroys the object, which is called by the GC (garbage collector), and can be called but not rewritten by the programmer. He's a protected method in Java.
Object
Is the final class of all classes (parent class)
Abstract
Abstract class
There is no abstract method in the syntax that allows abstract classes, but it loses its abstract meaning.
Will constantly extract the parent class to a certain level
Abstract methods
Abstract methods must be in an abstract class
The abstract method that the parent class writes, the subclass must all implement
Abstract method in parent class, only signature, no method body
Final
The final class is not inherited by the final class.
Final method cannot be overridden by final modification of the method as the final method
Final modified variables and properties are called constants, and data cannot be changed
Packaging
The composition of the class
Property
Method
The hiding of information
Four access modifiers
Private
Private permissions, which are accessible only in this class
Default
Default permissions, accessible only in the same package class
Protected
Protected permissions can only be accessed in the same package class or subclass of a different package class
Public
Public permissions, accessible from all locations
Implementation of the method
Must have a public non-parametric construct
Must have a private property provided by the Get/set method that conforms to the naming convention
Inherited
Must be a relationship
Inheritance in keyword Extands,java is a single-inheritance structure
One subclass has and only one parent class
Construction methods are not inherited
In the Java bottom, is the memory overlay method implementation
Subclass Object = Parent Class object Part + Subclass Object part
ToString: Returns a description of an object string. The output is: class name @ Reference address
equals: Determines whether the two objects are business equal (overriding method)
Finalize: Destroys the object, which is called by the GC (garbage collector), and can be called but not rewritten by the programmer. He's a protected method in Java.
Object
Is the final class of all classes (parent class)
Abstract
Abstract class
There is no abstract method in the syntax that allows abstract classes, but it loses its abstract meaning.
Will constantly extract the parent class to a certain level
Abstract methods
Abstract methods must be in an abstract class
The abstract method that the parent class writes, the subclass must all implement
Abstract method in parent class, only signature, no method body
Final
The final class is not inherited by the final class.
Final method cannot be overridden by final modification of the method as the final method
Final modified variables and properties are called constants, and data cannot be changed
Javaoo encapsulation, inheritance, abstract summary