The 16th compound takes precedence over inheritance
If you are unsure of the relationship between B and a, and B is indeed a, then you should not use B to inherit a, or you will expose the implementation details, and your implementation will be limited to the original implementation, Is-a.
The first example of the book cited implements a class extends HashSet class, because the lack of understanding of the AddAll method of the HashSet class (AddAll calls the Add method repeatedly), resulting in a multiple count of calls, which is the implementation of their own constraints on the implementation of the parent class.
There is also a note in the book that if the superclass adds a new method to the subsequent version, exactly the same as the new method in your class (the argument list and the function name match), but the return value is inconsistent, then a compilation error occurs (the function signature consistent return value is inconsistent and cannot be overloaded).
The use of composite methods can solve these problems, the book cited example, is to use the Instrumentedset class to wrap set instances, the statistical steps are implemented in Instrumentedset, and the operation of the set independent, with an object to operate
[Effective Java Reading notes] Chapter III Class and interface 16th