Topic
  • 1 reply
  • Latest Post - ‏2004-10-28T19:07:45Z by SystemAdmin
SystemAdmin
SystemAdmin
2768 Posts

Pinned topic about volatile keyword

‏2004-10-28T05:17:10Z |
Can someone please explain the function of the volatile keyword. Thank you.
Updated on 2004-10-28T19:07:45Z at 2004-10-28T19:07:45Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    2768 Posts

    Re: about volatile keyword

    ‏2004-10-28T19:07:45Z  
    The volatile keyword is most typically used to ensure that threads have the most current value of the variable. Threads may make copies of instance variables; volatile makes certain the value is the same in all threads. See 8.3.1.4 volatile Fields and What does volatile do? for more information.