Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
Java
« Previous
Next »
A thread which has invoked wait() method of an object, still owns the lock of the object. Is this statement true or false?
Options
- True
- False
CORRECT ANSWER : False
Discussion Board
Threads
The java.lang.Object.wait() causes current thread to wait until another thread invokes the notify() method or the notifyAll() method for this object. In simple terms during wait() it doesn't own the lock of the object. But whereas it still owns the object's monitor and keep monitoring till its execution is over. It hands over the ownership of the monitor and wait for another thread to notify using a notify method or notifyAll method. This way a method can be called by only the thread that has the ownership of the object's monitor.
Rohit Sharma 07-27-2014 11:32 PM
« Previous
Next »
Write your comments
*
*
Email must be in the form someone@domain.com
*
*
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
Related Content
Java Beginner (11)
Java (39)
Java (40)
Java (22)
Java (30)
Java (25)
Java (20)
Java (20)
Core Java (20)
Core Java (10)
Core Java (72)
EJB (20)
JDBC (20)
Applet (20)
Struts (21)
Servlets (20)
Java Web Services (20)
Javascript (40)
J2EE (10)
jQuery (46)
Advertisement
▲