inheritance - Java inhertiance of private fields -
i know subclass has no access private field other public setter/getter of super-class. not have experience object-oriented languages far. should make fields private , use public method access them in sub-classes, or make them protected , use freely in subclasses , package?
make them protected. sole purpose why keyword exists!
Comments
Post a Comment