去重

作者: 学习吧朱小宁 | 来源:发表于2018-03-20 16:05 被阅读0次

LIst去重

List deptList=new ArrayList<>();

        for (String string : list) {

        String deptLeaderId = systemRemoteService.getUserDepartmentLeaderIdUserId(string);

        if(!deptList.contains(deptLeaderId)) {

        deptList.add(deptLeaderId);

        }

        }

String 去重

String str=“”;

str。indexOf();//返回一个int值

相关文章

网友评论

      本文标题:去重

      本文链接:https://www.haomeiwen.com/subject/dssbqftx.html