tags:

views:

200

answers:

3

How to suspend current thread for 20 seconds in java?

+6  A: 

Thread.sleep(20000)

Kevin
+11  A: 

Thread.sleep(20*1000);

nos
A: 

you may also want to include the try catch:

try {
  Thread.sleep(20*1000);
} catch(InterruptedException e) { }
mkoryak
should be InterruptedException, not all exceptions in general
Jason S