Multiple choice technology programming languages

In java, threads acquire lock over:

  1. Heap memory

  2. classes

  3. objects

  4. variables

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In Java, threads acquire locks at the object level using intrinsic locks (monitor locks). Each object has an associated monitor that threads can lock or unlock. Threads do not lock heap memory, classes themselves, or individual variables - they lock objects to achieve synchronization.