2024年4月11日

list不能直接remove

摘要: 当一个list集合里面包含某个id,我需要把它过滤掉,于是,我直接上代码 if (managerIds.contains(userId)) { managerIds.remove(userId);}return managerIds; 然而,这种写法是大错特错了! 因为,list不能直接remove 阅读全文

posted @ 2024-04-11 16:30 十日复十日 阅读(1) 评论(0) 推荐(0) 编辑

导航