Java多线程顺序执行
Java多线程,一直没搞懂同步的作用!一直以为同步的时候只要锁住对象就能顺序执行了:publicclassTest{ finalstaticbyte[]b=newbyte[0]; publicstaticvoidmain(String[]args){ Testt=newTest(); t.thread.start(); Testt2=newTest(); t2.thread.start(); } Threadthread=newThread(newRu...