Java OCA OCP Practice Question 1279

Question

How many locks does an object have?

  • A. One
  • B. One for each method
  • C. One for each synchronized method
  • D. One for each non-static synchronized method


A.

Note

An object has only one lock, which controls access to all synchronized code.




PreviousNext

Related