ArrayList中的indexOf、contains、remove的等方法实际需要equals方法的支持。其中contains方法调用的是indexOf方法: public boolean contains ...