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...

what is the difference between sleep() and Wait()?

Answer Posted / deepak divvela

The main difference is if we need the thread wants to block
particular period of time we just choose sleep().
and when the thread called wait() means it will blocked
untill we will call notify(),notifyAll();

Is This Answer Correct ?    49 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between jdk, jre, and jvm?

1111


Explain about main() method in java ?

1069


How is java created?

940


What do you understand by java virtual machine?

1193


What is the use of optional ?

1033


How to sort array in descending order in java?

921


What is lambda expression in java?

1036


Is java same as core java?

1092


Why is a string immutable?

1005


What is an anonymous class in java?

1100


Explain inheritance in java?

982


Where are the local variables stored?

1071


What are format specifiers in java?

1060


What is the difference between notify and notifyall method?

1213


What is supplier in java?

1000