When a shopkeeper asks you for money, will you give them your wallet to take the money out ? If you do, then you are breaking encapsulation. The same logic applies to classes and access to methods. In general, public getters and setters result in breaking encapsulation
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I read a statement somewhere long time back
When a shopkeeper asks you for money, will you give them your wallet to take the money out ? If you do, then you are breaking encapsulation. The same logic applies to classes and access to methods. In general, public getters and setters result in breaking encapsulation