Creating a process for objects in Java

Source: Internet
Author: User
Example: The process of creating object A of Class A 1, because the constructor is essentially a static method, the Java interpreter must look for the classpath to locate the a.class file when the Class A object is first created (that is, a static method of Class A is executed), or when the static method/static domain of Class A is first accessed. 2, loading the a.class file, all actions related to static initialization are executed. Therefore, static initialization is performed only once when the class object is first loaded. 3, allocate enough storage space for the A object that will be created. 4, perform all initialization actions that appear at the field definition. 5, executes the constructor (if there is inheritance, first executes the constructor of the base class).

Creating a process for objects in Java

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.