How to suspend a current Thread for X seconds lets say 10 seconds in Java?
It can be easily done by the Thread.sleep method.
So the code below will put a thread to sleep for 50 seconds
try { Thread.sleep(50*1000); } catch(InterruptedException e) { }
Login using Google
77 questions
58 answers
9 comments
54,686 users