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 the difference between a while statement and a do statement?
What are the disadvantages of java sockets?
What is aop java?
Does jvm maintain a cache by itself? Does the jvm allocate objects in heap? Is this the os heap or the heap maintained by the jvm? Why
What if I do not provide the string array as the argument to the method?
How do you type the lambda symbol?
Which class is the superclass of every class?
What is the difference between a jdk and a jvm?
What is the difference between java se and java ee?
Why do we create dto in java?
What is gwt in java?
What is transient in java?
what is the package for freshers in valuelabs.
What is stateless object in java?
What is the front end for java?