Earlier quoted context omitted.
get()/set() is the same as a public property, until you change the implementation, while maintaining interface compatibility, which is the point. In C# you'd have a point, they have parametric properties and readonly properties. So you'd favor just declaring public properties. But this is why context matters. And OO design principles also depend on this context.
> until you change the implementation, while maintaining interface compatibility, which is the point How many times have you seen that done on the real world? And how many times have you seen that done, and it not creating a lot of bugs because of the behavior change without interface changes? Personally, I've seen the first one more than zero times. Not the second. Every single time somebody decided to mess with a s…
And yes I see it every day. The collection interfaces in Java have countless swappable implementations. Those are basically getters and setters on a vector.
I also had to change entity storage to columnar for a project. Did that. Never had to change a line of code outside the entities.