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

diff b/w sleep(1000) and wait(1000)?

Answer Posted / rajani nagandla

The sleep method is used when the thread has to be put
aside for a fixed amount of time. Ex: sleep(1000), puts the
thread aside for exactly one second. The wait method is
used to put the thread aside for up to the specified time.
It could wait for much lesser time if it receives a notify
() or notifyAll() call. Ex: wait(1000), causes a wait of up
to one second. The method wait() is defined in the Object
and the method sleep() is defined in the class Thread.

Is This Answer Correct ?    44 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

which is advanced deep technology in java launched by the sun microsystem??? The answer is very logical If u need correct answer mail me at priya_gupta@gmail.com

3607


Why unicode is important?

894


Difference between character constant and string constant in java ?

962


explain multi-threading in java?

965


What are the advantages of arraylist over arrays?

1040


What are extraneous variables examples?

1017


how would you implement a thread pool? : Java thread

847


What is supplier in java?

957


how its run?

1008


How an object is serialized in java?

934


When do we use hashset over treeset?

990


Why does abstract class have constructor?

946


What is the difference between a local variable and an instance variable?

1021


Difference between Linked list and Queue?

980


Write a program to solve producer consumer problem in java?

952