CrazyEngineers
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Anoop Kumar

    MemberSep 12, 2013

    never used volatile variables in real project.
    you can see some stackoverflow discussion, they have some practical examples

    #-Link-Snipped-#

    This discussion is very clear why volatile

    #-Link-Snipped-#
    Are you sure? This action cannot be undone.
    Cancel
  • Dhaval Pujara

    MemberSep 15, 2013

    volatile modifier tells the JVM that a threbad accessing a the variable must always reconcile its own private coppy of the variable with master copy in memory ......ALL IN ONE THAT STOP ACCESSING MULTIPLE THREAD TO INSTANCE VARIABLE VOLATILE IS USED ultimatly its only applied to instance variable not local variable
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register