PrepAway - Latest Free Exam Questions & Answers

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?

PrepAway - Latest Free Exam Questions & Answers

A.
Protected

B.
Private

C.
Public

D.
Friend

2 Comments on “Which access modifier should you use?


Leave a Reply