How do we specify pause times in my program?
- Using the sleep function in Java, the thread’s execution can be put on hold. During this pause session, the thread does not loose ownership of the monitors.
Public static void sleep(long millis)
- Here, millis is the time in mili seconds to hold the threads execution.