关于集合List的remove方法

今天 用到 Liist集合 使用 其中的 remove方法移除集合中的 东西 结果 移除不了 让人折腾了 半天

最后才发现 List.remove(int index) 里面的入参类型 是 int 类型 而我给它传的是Integer类型。。 就是此原因导致我苦苦摸索了2小时。

我就纳闷  List.set(int index, E element) 入参类型也是 int 类型  而我传给他的也是Integer类型 此方法也能用啊。。

哎 真拿它没办法

原文地址:https://www.cnblogs.com/hlantian/p/10194631.html