public class User { private String first, last, city; public User() { } public User(String first, String last, String city) { this.first = first; this.last = last; this.city = city; } public String getFirst() { return first; } public void setFirst(String first) { this.first = first; } public String getLast() { return last; } public void setLast(String last) { this.last = last; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } }
- 2It depends on what it is used for. - Sergey Gornostaev
- oneOr maybe POJO? ) - Suvitruf ♦
- @SergeyGornostaev and unless there are different tasks? Do not tell me where you can read about it? - Sergey Gukov
- 2If a class is used to model data stored in a database, then it is a model . If a class is used to transfer data between application layers, then its instances are D ata T ransfer O bject. - Sergey Gornostaev
- here, here .. structurally this is POJO, and it can be used as a DTO or Model - keekkenen
|