[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

JAVA Programming :: Basic Concepts - Discussion

Home > JAVA Programming > Basic Concepts > MCQs Questions Discussion

33 / 64

Choose the correct option.

Which of the following keywords indicates a thread is releasing its Object lock?

Arelease

Bwait

Ccontinue

DnotifyAll

Answer: Option (Login/Signup)

Show Explanation

Option C is incorrect, as continue keyword has nothing to do with locks.

Option D is incorrect, as notifyAll() method can be used in Java to give the notifications for all waiting threads of a particular object that the required lock is available.

Leaving us with option B, which is the correct option, because if a thread calls wait() method on any object, it immediately releases the lock of that particular object and enters into the waiting state.

Asked In ::

Post Your Answer Here:     

Reply    
Rate This: +0 -0
    Report


Report Error

Please Login First Click Here