Question: Some programmers prefer not to use protected access, because they believe it breaks the encapsulation of the superclass. Discuss the relative merits of using protected
Some programmers prefer not to use protected access, because they believe it breaks the encapsulation of the superclass. Discuss the relative merits of using protected access vs. using private access in superclasses.
Step by Step Solution
3.42 Rating (152 Votes )
There are 3 Steps involved in it
Both protected and private access modifiers determine how the fields and methods of a class can be accessed by other classes Private Access If a field ... View full answer
Get step-by-step solutions from verified subject matter experts
