Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the difference between a while statement and a do statement?

926


What are the disadvantages of java sockets?

1089


What is aop java?

892


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

881


What if I do not provide the string array as the argument to the method?

892


How do you type the lambda symbol?

885


Which class is the superclass of every class?

1002


What is the difference between a jdk and a jvm?

895


What is the difference between java se and java ee?

839


Why do we create dto in java?

928


What is gwt in java?

899


What is transient in java?

861


what is the package for freshers in valuelabs.

6148


What is stateless object in java?

942


What is the front end for java?

979