Java-thinking in Java 5th chapter initialization and cleanup

Source: Internet
Author: User

Initialization and Cleanup (cleanup) are two issues that involve security.
The constructor ensures that the class is initialized with the same name as the class name, and the constructor is called automatically during initialization.
The default constructor is a constructor that does not accept any arguments.
Overloaded methods have the same function name, and the argument list is unique.
If the actual data type passed in is less than the formal parameter type of the method declaration, the actual data type is prompted.
The char type can match the int type and pass in as a parameter.
When a function does not have a constructor, the compiler automatically creates a default constructor; If a constructor is defined, the compiler does not create a default constructor.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Java-thinking in Java 5th chapter initialization and cleanup

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.