小例子:创建三个线程A,B,C,A线程循环10次,接着B线程再循环10次,然后C线程再循环10次,然后A线程又循环10次,如此循环往复50次。代码如下:publicclassThreeThreadCommunication{publicstaticvoidmain(String[]args){finalBusinessbusiness=newBusiness();newThread(newRunnable(){@Overridepublicvoidrun(){for(inti=1;i<...
查看全文