Why is count1 < count2 after running the following code? Both count1 and count2 should be 2000000

后端 未结 0 870
野性不改
野性不改 2021-01-12 02:04
Compile and run in JDK11 and look at the results. sum1 is the time taken by the synchronized code and sum2 is the time for the AtomicInteger code. count1 is the re         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题