Pregunta de entrevista de Deutsche Bank

wait ,notify detail explanation

Respuesta de la entrevista

Anónimo

19 oct 2020

wait notify & notifyall are all object class methods, wait releases the lock occupied by current thread of execution, while notify is just a signal to jvm that any one thread waiting for current lock can be invoked only once the code gets executed & lock is available , additionally wait & notify they must be used inside synchronized block