Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: changed from increment to assignment

...

Code Block
bgColor#FFcccc
class Test {
  static long i = 0;
  static void one(long j) { i++ = j; }
  static void two() {
    System.out.println("i =" + i);
  }
}

...

Code Block
bgColor#ccccff
class Test {
  static long i = 0;
  static void one(long j) { i++ = j; }
  static void two() {
    System.out.println("i =" + i);
  }
}

...

Code Block
bgColor#ccccff
class Test {
  static long i = 0;
  static void synchronized one(long j) { i++ = j; }
  static synchronized void two() {
    System.out.println("i =" + i);
  }
}

...