Initialization order of Java objects

The order in which Java objects are initialized

    static block of the parent class, static properties of the parent (tied for priority, according to the code in order to perform)
    (only in class load for the first time to perform a) subclasses of static code block, a subclass of static properties (tied for priority, according to the code in order to perform)
    (only in class load for the first time to perform a) code blocks in the construction of the parent class of the parent class non-static properties (tied for priority,
    every new object is executed) p>t constructor
    (every new o>t is executed) subclass constru> block, the non-static properties of the subclass (tie precedence, According to the code in order to perform)
    (once every new object will perform a) subclass constructor
    (once every new object will perform a)


Read More: