// method run is the code to be executed by new thread
public void run()
{
try
// put thread to sleep for sleepTime amount of time
{
System.out.printf("%s going to sleep for %d milliseconds.\n",
threadName, sleepTime);