Hi Everybody
Consider the code:
class SecondThread extends
Thread {
public void run()
{
System.out.println("In the Second Thread");
}
}
class ThirdThread extends SecondThread
{
public void run()
{
System.out.println("In the third thread");
}
public static void main(
String args[])
{
SecondThread st = new SecondThread();//Thread not alive
ThirdThread tt = new ThirdThread();//Thread not alive
st.start();//Thread alive
tt.start();//Thread alive
}
}
In the above program i need to make a "thread" to "sleep" so how and where to place sleep method in the above program.Also i need to know how to use
sleep method placed in the "try/catch" block
tx®ards
venkat