PHP中文网2017-04-18 10:56:00
Inheritance means that a subclass inherits the characteristics and behaviors of the parent class, so that the subclass object (instance) has the instance fields and methods of the parent class, or the subclass inherits methods from the parent class, so that the subclass has the same behavior as the parent class
The synchronized keyword is used to control thread synchronization, which is to control the synchronized code segment from being executed by multiple threads at the same time in a multi-threaded environment. synchronized can be added to a piece of code or a method.
These two points are not conflicting