When a static synchronized method is executed, the thread holds a lock for that method's ________.

  • class
  • instance
  • subclass
  • superclass
In Java, when a static synchronized method is executed, it holds a lock for the entire class rather than an instance of the class. This means that other threads attempting to access any synchronized static method of the same class will be blocked until the lock is released, ensuring exclusive access to the class-level resource, which is "the method's ________."
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *