A simple multi-threading example, how to analyze the execution process of multiple threads?
In this example, I want to know how these five threads execute, and then this result will appear on the console?
ringa_lee2017-05-27 17:42:53
You will find different results if you execute it a few times. This cannot be accurately analyzed because threads are executed by seizing the right to use the CPU. You cannot know which thread grabs the right to execute first. You can only deduce it from the output results.