Question: Which statement about Encapsulation is correct? a. Encapsulation refers to storing a value in a variable, and never changing it again. This way its value
Which statement about “Encapsulation” is correct?
a. Encapsulation refers to storing a value in a variable, and never changing it again. This way its value is safe forever.
b. Encapsulation refers to storing a value variable, and making it impossible to retrieve it.
c. Encapsulation refers to controlling the way a variable is accessed by forcing users to use getter/setter methods that prevent misuse of the variable.
d. Encapsulation implies that the methods of a class are not accessible to the other classes.
Step by Step Solution
3.32 Rating (152 Votes )
There are 3 Steps involved in it
c Encapsulation refers to controlling the way a variable is accessed by forcing users to use getters... View full answer
Get step-by-step solutions from verified subject matter experts
