3 ms·
I think I understand what the author means. When writing Java code I prefer to use public members in my data classes and only use getters/setters sparingly. Al
by winrid 7y ago
I think I understand what the author means.
When writing Java code I prefer to use public members in my data classes and only use getters/setters sparingly. Also, I prefer to have the logic in until classes if I can. I suppose I'm not a huge OOP fan.
Of course I have to follow whatever patterns my teammates follow and hardly anyone writes Java like that... But my personal projects I think have much cleaner and easier to understand code with this approach.