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

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -