Home Help Java V volatile Java Keyword



volatile Java Keyword
Posted on: June 12, 2009 at 12:00 AM
The volatile is a keyword defined in the java programming language.

volatile Java Keyword

     

The volatile is a keyword defined in the java programming language. Keywords are basically reserved words which have specific meaning relevant to a compiler in java programming language likewise the volatile keyword indicates the following :

-- The volatile keyword is mostly used to indicate that a member variable of a class may get modified asynchronously by more than one thread.
-- This thing is noticable that the volatile keyword is not implemented in many Java Virtual Machines.
-- The volatile keyword from the side of compiler tries to guarantee that all the threads should see the same value of a specified variable.

Example to use the volatile keyword in a class:

public class Cla

{

volatile int sharableValue;

}

 

Related Tags for volatile Java Keyword:
javacprogrammingcomcompilerantlanguagewordcompilekeykeywordspilbasicifcallkeywordprogrammpitoramicalcilanwordseilpeincalasmntmincaminjesspecallagepimemeanprorelwhichsspkhalleaarspecificreservedrdsrvvassrdavevaevaicaicaprmiomogro


More Tutorials from this section

Ask Questions?    Discuss: volatile Java Keyword  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.