Question: Using protected If a method or instance variable is modified by protected (rather than public or private), then it can be accessed by name inside
Using protected
If a method or instance variable is modified by protected (rather than public or private), then it can be accessed by name inside its own class definition, by name inside any class derived from it, and by name in the definition of any class in the same package. Trying to figure out how the part in bold is done.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
