posted 15 years ago
Hi!
Thread.sleep() causes the current thread to 'sleep' for at least the amount of time specified in the parameter. However, if the intention is to let the thread 'wait' for a notification (and in any case, wake up after a certain time-limit has expired), you can make use of 'wait()' method passing a duration.
Hope this helps.
Best regards,
- Aditya Jha