0

In what cases would you use one and not the other? And how do they work differently?

interdevwebaloper
  • 157
  • 1
  • 5
  • 13

1 Answers1

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