Skip to main content
2 of 2
deleted 9 characters in body
Chris Dennett
  • 22.8k
  • 8
  • 61
  • 85

The lock objects are different on the static method and non-static method. The static method uses the Class object as the lock (lock obj: MyClass.class), while the non-static method uses the instance object as the lock to which the invocation of the method at that time is bound (lock obj: this).

Chris Dennett
  • 22.8k
  • 8
  • 61
  • 85