Here's a summary of the process of creating objects in Java;
Will involve
1. Static properties of subclasses, static code blocks, construction methods
2. Static property of parent class, static code block, construction method
That is, to share, load static properties, static blocks of code, order of construction methods
Load the static properties of the parent class----Static code blocks----the static property of the child class--------------The parent class is constructed by--
How to construct subclasses
How does the construction method work?
is to initialize the normal properties in the class from top to bottom.
In short, the order of the late Fathers class, after subclasses
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/07/44/wKiom1nGKKLBlrUcAACzFBN2NsQ097.png "title=" Qq20170923172151.png "alt=" Wkiom1ngkklblrucaaczfbn2nsq097.png "/> (picture not original)
This article is from the "Xej Distributed Studio" blog, so be sure to keep this source http://xingej.blog.51cto.com/7912529/1967985
The creation process of Java objects