Home > database >  Java in the sleep () and wait ()
Java in the sleep () and wait ()

Time:03-06

CodePudding user response:

Sleep is a Thread class (Thread class) method, the wait is the method of Object class

CodePudding user response:

Sleep don't release the object lock, wait to give up object lock; Sleep suspend threads, but remain monitoring status, after the automatic recovery,
  • Related