How to define the class field available only to its sub-classes in Java?
You have to specify the keyword «protected» while declaring the variable. After that the variable will be "visible" only to sub-classes.
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
JavaJSPJSF