summaryrefslogtreecommitdiffstats
path: root/tests/new/volatileKeyword/Driver.java
blob: acac776d10d6c676e520041cfc19d90c0236d5c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import org.aspectj.testing.Tester;

public class Driver {
    volatile static boolean completed = true;
    public static void main(String[] args) { test(); }
    public static void test() {
        Tester.check(completed, "static volatile filed");
        Tester.check(new C().completed, "instance of volatile filed");
    }    
}

class C {
    volatile boolean completed = true;
}