Sunday, May 08, 2005

java.lang.Thread's sleep method is static

I have noticed that Java programmers often use Thread's sleep method like this:
Thread.currentThread().sleep(DateUtils.MILLIS_IN_SECOND);
however, Thread.sleep is static, thus the following is equivalent:
Thread.sleep(DateUtils.MILLIS_IN_SECOND);

No comments: