A Developer Gateway To IT World...

Techie Uncle Software Testing Core Java Java Spring C Programming Operating System HTML 5 Java 8 ES6 Project

Sleep() method

If a thread don’t want to perform any operation for a particular amount of time then we should go for sleep() method.
  • public static native void sleep(long ms) throws interruptedException
  • public static void sleep(long ms, int ns) throws interruptedException