我是个新手 完全不太会java 求大神帮助我下 问题是这样的我有两个database 然后我把他们的table读出来写在collection
的class里面 class T { private final String T; public Rfq(String T) { this.T= T; } public String getTId() { return TId; } } 大概是这样 其实我也不是很懂 然后我连接两个database得到的是两个resultA和resultB 大概code是 collection
resultA= ...connection.query (select from ... ) 我现在的问题是我要把这两个result里面同样column name的(比如 两个都有个column叫id) 我要找到一个合集 求帮助阿求帮助 求指点!!
首先T类中增加hashCode和equals方法。
public class T {然后,得到resultA和resultB后,
Collection<T> resultA = ...;