without "synchronized", even if the transfer's locking the object, another thread can still enter test() and read the object state. But, the object is not in a consistent state yet (the transfer is doing update)You don't want the interim state to be exposed to outside.
对象访问这个test(),
那就有可能得不到正确的结果了。