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 are orm tools in java?
How do I find jre version?
I am trying to create a new universal user group. Why can't i? : java security
Is java installed on windows 10?
What is the difference between lambda expression and anonymous methods?
How do I open the java console in windows 10?
What is the difference between map and flatmap in java?
Why are command line arguments passed as a string?
What are the advantages of java sockets?
Can optional be null?
What is loose coupling in java?
How does java handle integer overflows and underflows?
What is Map,List,hashtable,ArrayList and difference between them??
What is ui framework in java?
How does jpa repository work?