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)?

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / gokul d

The thread which is under sleep state can be resumed back
automatically after the time mentioned.But thread under
wait has to be resumed back only by calling the notify()
method.

Is This Answer Correct ?    7 Yes 2 No

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

Answer / amod

the sleep() method is to make a thread to stop 4m working
for a fixed time sleep(5000)
it will make the thread to sleep for 5min
lly wait method ie wait()makes the thread to stop 4m
workin when other thread needs to excuteee

Amod s Dhupkar

Is This Answer Correct ?    9 Yes 4 No

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

Answer / satwant singhnagpal

In sleep method the thread does not release the object lock

Is This Answer Correct ?    3 Yes 11 No

Post New Answer

More Core Java Interview Questions

What are wrapped classes?

7 Answers   Samsung,


what is connection pooling with example?

3 Answers   Amdocs,


What do you understand by the term wrapper classes?

0 Answers  


What is the use of object and class classes?

0 Answers  


How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters in java programming?

0 Answers  


What is difference between java and java ee?

0 Answers  


Name component subclasses that support painting in java programming?

0 Answers  


What are legal modifiers that we can use to declare an inner class?

1 Answers   Infosys,


What is nan in java?

0 Answers  


Explain the difference between jdk, jre, and jvm?

0 Answers  


why Interface used?

0 Answers   HCL,


What is the reason behind using constructors and destructors?

0 Answers   HCL,


Categories