publicsynchronizedvoidincrement(){count++;}publicsynchronizedintgetCount(){returncount;} 1. 2. 3. 4. 5. 6. 7. 这样,就实现了Java提供对多线程同步的语言级支持。 三、序列图 SharedResourceThread2Thread1SharedResourceThread2Thread1increment()count++getCount()return countincrement()count++getCount()re...