Last active
March 23, 2016 21:17
-
-
Save m0wfo/478355e54161d93e0bfa to your computer and use it in GitHub Desktop.
Nonvolatile example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NonVolatileClass implements Runnable { | |
public long a; | |
@Override | |
public void run() { | |
long b; | |
for (int i = 0; i < 1E9; i++) { | |
b = a; | |
} | |
System.out.println(a); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment