Here you can find the source of sleep(int millis)
public static void sleep(int millis)
//package com.java2s; /** Copyright by Barry G. Becker, 2000-2011. Licensed under MIT License: http://www.opensource.org/licenses/MIT */ public class Main { /**//from www.j a va2 s .co m * Cause this thread to sleep for specified amount of time while other threads run. */ public static void sleep(int millis) { if (millis > 0) { try { Thread.sleep(millis); } catch (InterruptedException e) { e.printStackTrace(); } } } }