Lowest price ever! Learn Generative AI for 48% less!
Get my discount0
How to make time delay in java.
2 Answers
+ 2
try {
Thread.sleep(milliseconds);
} catch (InterruptedException e) {
}
0
You can use Thread.sleep(time); /* time in milliseconds */
I think you need to surround it with a try/catch though.