Thread with sleep method

The sleep() method of Thread class is used to pause the execution of current thread for specified time. This method takes the “long” value which is the actual time in milliseconds for thread to sleep. There are 2 overloaded methods available for sleep() 1) public static void sleep(long millis) throws InterruptedException 2) public static void […]

Share this article on