Categories:
.NET (357)
C (330)
C++ (184)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (2)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
What is the relationship between synchronized and volatile keyword?
What is the relationship between synchronized and volatile keyword?
✍: Guest
The JVM is guaranteed to treat reads and writes of data of 32 bits or less as atomic.(Some JVM might treat reads and writes of data of 64 bits or less as atomic in future) For long or double variable, programmers should take care in multi-threading environment. Either put these variables in a synchronized method or block, or declare them volatile.
2012-08-28, 3014👍, 0💬
Popular Posts:
How can we format data inside DataGrid? Use the DataFormatString property.
How To Run a JUnit Test Class? A JUnit test class usually contains a number of test methods. You can...
How To Set session.gc_divisor Properly? - PHP Script Tips - Understanding and Using Sessions As you ...
How To Change System Global Area (SGA)? - Oracle DBA FAQ - Introduction to Oracle Database 10g Expre...
What will happen in these three cases? if (a=0) { //somecode } if (a==0) { //do something } if (a===...