Brian

23%
Flag icon
Additionally, it isn’t always possible because some methods cannot be implemented without access to private fields inaccessible to the subclass.
Brian
Does composition address this problem though? Still sounds like unfortunate/poor design on part of parent class creator.
Robert
· Flag
Robert
Right, private methods often lock out extendability, composition and inheritance alike 😕.
Effective Java
Rate this book
Clear rating
Open Preview