Which access modifier should you use?

You are designing a class for an application. You need to restrict the availability of the member variable accessCount to the base class and to any classes that are derived from the base class.
Which access modifier should you use?
A. Protected
B. Private
C. Public
D. Friend

microsoft-exams

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.