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 does el mean in java?
What is java lang noclassdeffounderror?
In hibernate what is the difference between the Session and SessionFactory?
What are anonymous methods and lambda expression?
What is entitymanager in jpa?
What about products that claim to block java applets at a firewall? : java security
What is the use of entity class in java?
What is mime in java?
Explain different way of using thread?
Which version of jdk is required for netbeans 8.0 2?
What is a context in java?
Differences between intermediate operations and terminal operations of java 8’s stream api?
What is jersey in java?
What do you understand by casting in java language? What are the types of casting?
What is jpa used for?