This is a discussion on keyword within the Java forums, part of the Programming Talk category; what is use of volatile keyword??...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
When we try to access a field, VM Optimizes field access by temporary result in local variable
Volatile is useful when we want to access a field with multiple threads without synchronizing. When we use Volatile keyword, Above mentioned VM's optimization feature is disabled and the temporary results will not be stored in local variable. |
|
|||
|
can u gv a small example
Quote:
|
![]() |
| Thread Tools | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| QTP Material | kalyansantosh | Software Testing | 5 | 05-08-2008 01:52 AM |
| using a variable between 2 programs | itzsug | C and C++ | 9 | 03-10-2007 04:28 PM |
| process | nageswari | Software Testing | 3 | 02-15-2007 07:15 PM |
| ORA-00923: FROM keyword not found where expected | rite2sekhar | Oracle Database | 0 | 03-02-2006 06:01 AM |
| comp.lang.c Answers to Frequently Asked Questions (FAQ List) | Steve Summit | Tech FAQ | 0 | 06-01-2004 07:00 AM |