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