All Questions
4 questions
6votes
4answers
35kviews
A DTO class having an ArrayList of its own type - is this considered a good design?
I came across a DTO class like the below one. class PersonDTO { private String firstName; private String middleName; private String lastName; private String dob; // some 50 fields ...
2votes
1answer
3kviews
When should a class be final? [duplicate]
I've only really seen this on Java's wrapper classes (String, Integer, etc.), but never in open-source projects, and I was never taught about it in any books or classes. I know it means the class can'...
3votes
1answer
540views
Contract interface/class with inner classes/interfaces
Brief description of my project structure. I have some base classes like BaseView, BasePresenter ... . Also my project consists of modules, module represents one complete part of the application. ...
1vote
2answers
140views
When to store values in constants/finals
This might seem like an odd question, but I'm worried that I'm putting too many things as constants/finals at the top of my java class. I've started to put every value that is in my program into a ...