A getter is a method that gets the value of a property . In OOPs this helps to access private attributes from a class. A setter is a method that sets the value of a property. In OOPs this helps to set the value to private attributes in a class.19 Mar 2019