Why thread sleep is not recommended?
Calling the Thread. sleep() method is one technique to create synchronisation and implement wait, however it is not suggested because it is not constant and dependable. It is necessary to specify the time in milliseconds.