Java Key knowledge

Source: Internet
Author: User

1. The final modified class cannot be inherited and has reached the lowest level in the class hierarchy.

2. An abstract modified class or member method indicates abstraction, and the class containing the abstract method must be described as an abstract class and must derive a subclass. 3, Java for logic and logic or provide short-circuit operation function. Operation, the value of the expression on the left side of the operator is evaluated first, and if the value can be used to get the value of the entire expression, it is not calculated on the right. 4. When defining an array, you do not need to indicate the number of elements in the array. 5. In Java, arrays can only hold a fixed number of elements, and all required memory units must be requested one time, you can not first create and then append the number of array elements. Solve with the vector class. 6, protected void Finalize () throws Throwable---the object class, can be used by all classes, when the object instance is not referenced by any variable, Java will automatically "reclaim", reclaim the memory space occupied by the instance. 7, although a subclass can inherit all the methods and member variables from the parent class, but can not inherit the construction of the method, there are only two ways to get a class to construct a method: (1) to write a construction method, (2) the user does not write the construction method, the system provides a unique default construction method for the class.

Java Key knowledge

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.