package?test;
public?class?TestThread?{
public?static?void?main(String[]?args)?{
//?TODO?Auto-generated?method?stub
try?{
Thread?t?=?new?Thread(new?Runnable()?{
@Override
public?void?run()?{
//?TODO?Auto-generated?method?stub
System.out.println("in------------");
}
});
t.start();
t.join(10);
}?catch?(InterruptedException?e)?{
//?TODO?Auto-generated?catch?block
e.printStackTrace();
}
System.out.println("out--------------");
}
}