Basic and Advance Java Question:

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

Tweet Share WhatsApp

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.

Download Java PDF Read All 81 Java Questions
Previous QuestionNext Question
What is the difference between the Font and FontMetrics classes in Java Programming? What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy in Java Programming?