TestThreadSync

This is test of synchronized in java multithread. It is expected that once thread A receives the lock, it will not release the lock until all the operations are done in the synchronized statement.But according to my test, two threads switch to get the CPU to operate the synchronized sentences. I don't know why..