读代码

来源:互联网 发布:中南民族大学网络 编辑:程序博客网 时间:2024/05/16 14:44
 List<String> list = new ArrayList<String>(){ 
    {
        // 为list添加数据
        addAll(Arrays.asList("wangzhen456liupei123".split("")));
        add("1521"); 
        add("wanghzen123") 
        add("wangzhen"); 
    }
};
list.removeIf(s -> Pattern.compile("\\d").matcher(s).find());
0 0
原创粉丝点击