The creation process of Java objects

Source: Internet
Author: User

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

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.