What happens if sleep() and wait() executes in synchronized block?
Options
- The object still under lock in both the cases
- sleep() still under lock ,wait() the lock is removed
- sleep() the lock is removed ,wait() still under lock
- Sleep() and wait(),for both the method lock is removed
CORRECT ANSWER : sleep() still under lock ,wait() the lock is removed
Write your comments