After a thread enters a synchronized method on an object
In the following cases:
1. Whether the Synchronized keyword was added before other methods, if not added, it can.
2. If wait is called internally by this method, you can enter another synchronized method.
3. If all other methods add the Synchronized keyword and no wait is called internally, you cannot.
4. If the other method is static, it uses a synchronous lock that is the byte code of the current class and cannot be synchronized with a non-static method because the non-static method uses this.
When an object is passed as a parameter to a method, this method can change the properties of the object and return the changed result, is it a value pass or a reference pass?
is a value pass. The Java programming language has only value-passing parameters. When an object instance is passed as a parameter to a method, the value of the parameter is a reference to the object. The contents of the object can be changed in the called method, but the object's reference is never changed.
After a thread enters a synchronized method on an object