Using setter and getter method is known as
A
encapsulation
B
polymorpphism
C
inhertance
D
recursion
Correct Answer: encapsulation
In computer science, a mutator method is a method used to control changes to a variable. They are also widely known as setter methods. Often a setter is accompanied by a getter (also known as accessor), which returns the value of private member variable.