org.aspectj/tests/new/volatileKeyword/Driver.java

15 lines
384 B
Java
Raw Normal View History

2002-12-16 19:51:06 +01:00
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;
}