Java object initialization and code block initialization sequence

Source: Internet
Author: User

"Test !!!!!!!!!!! "Demo19 = 7; System. out. println (" hello world! Execution sequence of the test code block! AAAAAAAAAAA "x = 1; y = 2; Demo19 (d_x, x = 13; System. out. println (" hello world! Test code block execution sequence! BBBBBBBBBBBB "Demo19 demo =" test code block: x = "+ demo. x + ", y =" + Demo19 demoOne = Demo19 (12, 45 "test code block: x =" + demoOne. x + ", y =" + "other orders remain unchanged! This is an important "" code block! "

 

Initialization of abstract classes:

B C "if the subclass is not an abstract class, you must implement the method of the parent class" "test the constructor of the abstract class! "String name =" What is your "D" subclass calls the constructor of the parent class "" If the abstract class has no abstract method, so there is no problem with inheritance. "=" abstract class !!!!! "" Classes do not support multi-level inheritance !!!!!!!!!!!!!!!! "

 

 

 

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.