which book learn of java language
In Java sleep method is defined as a static method so it can be invoked directly with the name of class i.e. Thread.sleep(long millis).
In a Java Thread class this method is overloaded :
For reading more about sleep method you can visit the following links :