Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

Driver.java 384B

123456789101112131415
  1. import org.aspectj.testing.Tester;
  2. public class Driver {
  3. volatile static boolean completed = true;
  4. public static void main(String[] args) { test(); }
  5. public static void test() {
  6. Tester.check(completed, "static volatile filed");
  7. Tester.check(new C().completed, "instance of volatile filed");
  8. }
  9. }
  10. class C {
  11. volatile boolean completed = true;
  12. }