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 does el mean in java?

1084


What is java lang noclassdeffounderror?

958


In hibernate what is the difference between the Session and SessionFactory?

998


What are anonymous methods and lambda expression?

897


What is entitymanager in jpa?

928


What about products that claim to block java applets at a firewall? : java security

994


What is the use of entity class in java?

978


What is mime in java?

961


Explain different way of using thread?

1086


Which version of jdk is required for netbeans 8.0 2?

919


What is a context in java?

913


Differences between intermediate operations and terminal operations of java 8’s stream api?

1155


What is jersey in java?

1014


What do you understand by casting in java language? What are the types of casting?

907


What is jpa used for?

1038