Python Programming - Encapsulation - Discussion

Discussion Forum : Encapsulation - General Questions (Q.No. 39)
39.
What is the role of a getter method in encapsulation?
To set the value of a private variable
To retrieve the value of a private variable
To create a new instance of a class
To delete a private variable
Answer: Option
Explanation:
A getter method in encapsulation is used to retrieve the value of a private variable.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.