Which access modifier should you use for the GetData() method?

An application includes a class named Person. The Person class includes a method named GetData.

You need to ensure that the GetData() method can be used only by the Person class and not by any class derived from the Person class.

Which access modifier should you use for the GetData() method?
A . Public
B . Protected internal
C . Internal
D . Private
E . Protected

Answer: B

Explanation:

The protected keyword is a member access modifier. A protected member is accessible within its class and by derived class instances.

Latest 70-483 Dumps Valid Version with 288 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments