I have a scenario where i want a thread to sleep for specific amount of time.
Code:
public void run(){ try{ //do something
Why do you want to sleep for exactly 3 seconds? If it's just having to execute something after some time, try using a Timer.