0
Hello everyone! Can I create getter or setter myself with other name? ex. : recColor(); plaColor();
And I do not understand at all why I need these methods?
1 Réponse
+ 4
set method doesn't return anything so it should be void and it except 1 parameter
getter method return value so it should have return type based on private variable
These methods are just used to transfer data that is why we say DTO