Java Learning Essay-java reserved word

Source: Internet
Author: User
0, said in front

Before the main study c/cpp, for some reason, intends to start from the beginning of the Java Foundation from scratch, consolidation. So, starting today to open the hole Java Learning Essays, will be in the review of the Java process of some of the experience of what to write up, help themselves to organize knowledge.

First, synchronized

Synchronized keyword has not seen before, so Google a bit. Its role is to give the object, method, code block lock, so that at the same time only one thread execution, use. A relationship that is equivalent to a mutex.

Second, transient

After a class implements the serializable interface, some of the data does not want to be serialized, such as a password, which can be tagged with transient. The Tagged property is not written when serialized. Of course, the reading time is directly null.

Third, volatile

Used to identify that a variable is a shared variable, and when a volatile tag is used, different threads will always get the same value when they use the variable. However, it is important to note that volatile does not have atomicity.

Iv. STRICTFP

Precision floating point, when declaring a method with STRICTFP, the float and double expressions in the method strictly adhere to the fp-strict limit. It can be used to avoid floating-point calculation errors caused by different hardware, or to be used when more precise is needed.

Wu, instanceof

Used to determine whether an instance is an instance of a class (or its subclasses).

=================================================

I haven't written a blog for a long time, I can't feel anything. But it's going to cheer up.

Java Learning Essay-java reserved word

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.