我是JAVA OO的初学者...我最近遇到了一个代码,我有一个问题:
我有两个类代码:
public class QaaVO extends AbstractValueObject<Timestamp>{
private static final long serialVersionUID = -9216296526667849732L;
private Timestamp id;
private String textMessage;
private String userCode;
private Long areaId;
private Long statusID;
private Timestamp adId;
public Timestamp getAdId() {
//getters and setters
}
这一个:
public class AdVO extends AbstractValueObject<Timestamp>{
private static final long serialVersionUID = 7122369724482287295L;
private Timestamp id;
private String userCode;
private String userName;
private String email;
private String emailCc;
private String telephone;
private String dealerCode;
private int score;
private String dateOpen;
private Date dateClose;
private List<String> qaaVO;
getters and setter;
}
我的问题是......为什么我需要AdVO课程中的private List<String> qaaVO
?
答案 0 :(得分:0)
QaaVO和AdVO就我看到两个不相关的类而言。
在AdVO中你可能会使用很多字符串, 因此列表。名称是相同的,但它被声明为列表,而不是QaaVO的对象。