domingo, 31 de enero de 2016

Java - How to make a PAUSE in your program execution

Hi!
This tricks is very helpful. Java has an internal process called "Sleep" to perform this PAUSE, and it takes the number of milliseconds to wait as a parameter.
The following line makes the trick:

Thread.sleep(milliseconds);

So, you can call it this way:

Thread.sleep(5000);

The previous line will pause for 5 seconds.

That's it!
Share this post with your friends!

No hay comentarios.:

Publicar un comentario