Most asked top Interview Questions and Answers & Online Test
منصة تعليمية للتحضير للمقابلات والاختبارات عبر الإنترنت والدروس والتدريب المباشر

طوّر مهاراتك من خلال مسارات تعلم مركزة واختبارات تجريبية ومحتوى جاهز للمقابلات.

يجمع WithoutBook أسئلة المقابلات حسب الموضوع والاختبارات العملية عبر الإنترنت والدروس وأدلة المقارنة في مساحة تعلم متجاوبة واحدة.

التحضير للمقابلة

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: Whats the difference between notify() and notifyAll()?
Answer: notify() is used to unblock one waiting thread; notifyAll() is used to unblock all of them. Using notify() is preferable (for efficiency) when only one blocked thread can benefit from the change (for example, when freeing a buffer back into a pool). notifyAll() is necessary (for correctness) if multiple threads should resume (for example, when releasing a 'writer'?? lock on a file might permit all 'readers'?? to resume).

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library
Is it helpful? Yes No

Most helpful rated by users:

حقوق النشر © 2026، WithoutBook.