Java Programming thought notes

Source: Internet
Author: User

1.

2.

3. For classes that you create, the default behavior of equals () is to compare references . So unless you override the Equals () method in your own class, it's not possible to show the behavior we want. P45

4. Java does not have sizeof. Because all data types are the same size in all machines. The most important reason to use sizeof in C + + is for porting. P56

5. Calling the constructor in the constructor P86

In a constructor, you can call another constructor with this, but you cannot call 2. In addition, the construction call must be placed at the very beginning, or the compiler will make an error.

In addition to the constructor, the compiler prohibits invoking the constructor in any other method.

6. Static

A non-static method cannot be called inside a static method, or vice versa. P86

7.

Java Programming thought notes

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.