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

Answer :
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.

0 comments:

Post a Comment

 
Copyright © Interview Questions and answers - Blogger Theme by BloggerThemes & freecsstemplates - Sponsored by Internet Entrepreneur