.......
static List<Address> IPTable = new ArrayList<Address>();
.......
Object cc = new Address(packet.getAddress(),packet.getPort());
int b=IPTable.IndexOf(cc);
........
IndexOf方法是返回对象在链表中的索引。
我调试查看过,对象cc的内容与IPTable中的某一项确实完全一样,可不管如何返回值b都是-1,无法返回其索引,这是为什么啊?如何解决?