why the sleep method does not leave the lock and wait method
leave the lock
Answer Posted / balamurugan
Wait Method have parameters as MilliSecond after that
particular time over thread start execution.So Wait Method
Leave the Lock.
But in Sleep() have no any parameter so the thread have no
clue to leave the lock . that's y sleep method does not
leave the lock the programmer need to explicitly write
another method like notify() to execute.
| Is This Answer Correct ? | 0 Yes | 4 No |
Post New Answer View All Answers
What is lambda expressions action func and predicate?
In java thread programming, which method is a must implementation for all threads?
What is the use of entity class in java?
Is jvm a compiler or an interpreter?
How can I write a program that takes command line input?
What is the difference between deep copy and shallow copy in java
explain how java se 8 data and time api solves issues of old java date api?
What do you mean by exception handling?
Which version of my browser should I use? : java security
What is @qualifier in java?
What is meant by pass by reference and pass by value in java?
Do I need both jdk and jre?
Which instutute is offering course for rhino jain slee
How do you find lambda?
Explain the inheritance principle.