subclass needs access to private attribute of abstract superclass
问题 I have an abstract java class that implements a couple of its methods, but not others. In the methods it implements it uses a private attribute variable. The variable used also needs to be used in a subclass. As I see it my options are: Declare the private variable in both the subclass and the super class defer the implementation of the methods currently implemented in the abstract class to the subclasses Are there other options? Which of these makes more sense and why? 回答1: The question is