Java OCA OCP Practice Question 78

Question

Which of the following are true?

  • A. Only threads have locks.
  • B. Classes have locks.
  • C. Primitive types have locks.
  • D. Only Runnable objects have locks.


B.

Note

Classes have locks, but primitive types do not.




PreviousNext

Related