Tag: The parent class class constructs the HTTPS property www. GPO COM Instance members
The Java program execution sequence is as follows:
1. Default values for all properties in a class (in a swoop)
2. Parent class static property initialization, static block, static method declaration (executed in order of occurrence)
3. Subclass static Property initialization, static block, static method declaration (executed in order of occurrence)
Above is (class loading process, no construction method involved)
4. Call the constructor method of the parent class,
First the non-static member of the parent class is initialized, the construction block, and the declaration of the normal method (executed in the order of occurrence)
Then the parent class constructs the method
5. Call the constructor method of the subclass,
First the non-static member initialization of the subclass, the construction block, the declaration of the ordinary method (executed in the order of occurrence)
Then the subclass constructs the method
which
1-3: Class loading process, no construction method involved
1-5: Instantiation process, involving construction methods
Reference article:
Https://www.cnblogs.com/greatfish/p/5771548.html
Java Program Execution Order