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 http session in java?
Why oracle type 4 driver is named as oracle thin driver?
What is an actionevent in java?
How do javabeans work?
What is the use of jprofiler?
Is jdk required for netbeans?
What is transient in java?
Why is javac not recognized?
What if I do not provide the string array as the argument to the method?
What is javabeans api?
What is the difference between the boolean & operator and the && operator?
Is php faster than java?
What is numberformatexception in java?
What is a stream in java?
Differences between intermediate operations and terminal operations of java 8’s stream api?