The Thread that calls the sleep method is put to sleep for a number of milliseconds
at least equal to the input parameter.
1. Thread.sleep(long millisecs)
2. Thread.sleep(long millisecs, int nanosecs )
publicclass MainClass {
publicstaticvoid main(String[] argv) {
try {
Thread.sleep(500);
} catch (InterruptedException e) {
}
}
}