DEVFYI - Developer Resource - FYI

What happens when a thread cannot acquire a lock on an object?

Java Interview Questions and Answers (part 1)


(Continued from previous question...)

42. What happens when a thread cannot acquire a lock on an object?

If a thread attempts to execute a synchronized method or synchronized statement and is unable to acquire an object's lock, it enters the waiting state until the lock becomes available.

(Continued on next question...)

Other Interview Questions