In what cases would you use one and not the other? And how do they work differently?
Asked
Active
Viewed 142 times
1 Answers
0
getters and setters or accessors are used in most Object Oriented Programming languages / OOP , these logics says that a getter will only return a data value but wont modify, a setter in the other hand will modify that data
check this out Why use getters and setters/accessors?

D3Portillo
- 324
- 2
- 6