How can I delay a Java program for a few seconds ? | Team MAST

preview_player
Показать описание

Important: catch the InterruptedException.
Remember that you must add this catch-block. The video explains this a bit further.

where t = time in milliseconds to sleep

If you want to sleep for 1 second you should have :
Рекомендации по теме
Комментарии
Автор

This helped with my CS project at the last moment. Thank you! ♥

dhrubajyotipaul
Автор

Thanks a lot! Even in 2021, it's helping people... 😄

KpC
Автор

thanx man! helped a lot for my project:')

kevinvictor