How to Make a Program Sleep for a Pre-determined Period May 11, 2018 At times, you may want to make your application sleep for a determined period pending some other action. This is very easily achieved in Java with threads. Code sample: import