Static
Modifier variables: Static variables are initialized as the class loads, only one in memory, and the JVM allocates only one memory at a time, and all classes share static variables.
Modification method: Exists at the time of class loading and does not depend on any instance; The static method must be implemented and cannot be decorated with an abstract.
Decorated code blocks: the contents of a code block are executed after the class has been loaded.
Parent class static code block--Subclass static code block--parent class non-static code block----child class non-static code block--subclass constructor method
Final
Modifier variables:
Compile-time constants: Initialization is done during class loading and is compiled into any calculation. Can only be a basic type.
Run-time constants: The base data type or the reference data type. The reference is immutable, but the referenced object content is mutable.
Modification method: Cannot be inherited, can not be modified quilt class.
Decorated class: Cannot be inherited.
Modifier parameters: The final parameter is immutable.