The volatile keyword in java programming language
In this tutorial, we will discuss The volatile keyword in Java programming language
The volatile is a Java keyword, which is less known, less usage keyword.
Volatile keyword is related to the visibility of variables when a number of thread are running concurrently. The keyword volatile is used in the multi-threaded environment.
Volatile keywords can be used with the static keyword
Declaration
The syntax of the volatile keyword
private volatile <member-variable>;
Example
Example for volatile keyword
private volatile var;
There are other Java language keywords that are similar to this keyword
float keyword in Java
Suggested for you
Usage of this statement in the Java language