Setters and getters are used to provide access to a private variable. Could someone please explain why not just access the variable directly like sampleObject.attribute = "Value" or String attributeValue = sampleObject.attribute? What are the pitfalls of this direct access approach
I've actually read the article but it's anti-"setter getter". What I'm trying to do is to solicit pro-"setter getter" opinions.
Example #1: These cases are in my opinion quite rare and in any case does not necessitate having setters and getters for all the other fields
Example #2: I think these tools built on the fact that there are setters and getters so they adjusted to the situation they found. If this is not the case, I do believe they still would have found to work their way around