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 are orm tools in java?

1065


How do I find jre version?

965


I am trying to create a new universal user group. Why can't i? : java security

968


Is java installed on windows 10?

955


What is the difference between lambda expression and anonymous methods?

976


How do I open the java console in windows 10?

1112


What is the difference between map and flatmap in java?

978


Why are command line arguments passed as a string?

976


What are the advantages of java sockets?

1214


Can optional be null?

1045


What is loose coupling in java?

935


How does java handle integer overflows and underflows?

1095


What is Map,List,hashtable,ArrayList and difference between them??

2825


What is ui framework in java?

945


How does jpa repository work?

1006