public static void main(String[] args)...{
SellThread st=new SellThread();
new Thread(st).start();
try...{
Thread.sleep(1);
}catch(Exception e)...{
e.printStackTrace();
}
st.bool=true;
new Thread(st).start();
}
}
class SellThread implements Runnable...{
int tickets=20;
Object obj=new Object();
boolean bool=false;
public void run()...{

