Java class initialization order, java class initialization order

Source: Internet
Author: User

Java class initialization order, java class initialization order

1) Load Static resources of the parent class: static variables, static methods, and static initialization blocks are loaded in the defined sequence of static resources.

2) subclass static resource loading: Same as above

3) parent class member variables, member methods, and initialization Blocks

4) parent class Constructor

5) subclass member variables, member methods, and initialization Blocks

6) subclass Constructor

 

Learning Resources

Http://blog.csdn.net/owenchan1987/article/details/52879774

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.