Multiple choice

Which of the following keywords is used in multithreaded programming to ensure that no two threads access the same object simultaneously?

  1. wait

  2. notify

  3. notifyall

  4. synchronized

  5. break

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

This keyword is used in multithreaded programming to ensure that no two threads access the same object simultaneously.