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 lambda expressions action func and predicate?

970


In java thread programming, which method is a must implementation for all threads?

1008


What is the use of entity class in java?

929


Is jvm a compiler or an interpreter?

1041


How can I write a program that takes command line input?

881


What is the difference between deep copy and shallow copy in java

1002


explain how java se 8 data and time api solves issues of old java date api?

950


What do you mean by exception handling?

902


Which version of my browser should I use? : java security

944


What is @qualifier in java?

981


What is meant by pass by reference and pass by value in java?

920


Do I need both jdk and jre?

1033


Which instutute is offering course for rhino jain slee

2279


How do you find lambda?

875


Explain the inheritance principle.

930