java给List<String>批量赋值方法
传统赋值
Sring[] str={1,2,3}; List<String> childTb=new ArrayList(); for(String child:str){ childTb.add(child); }
批量赋值
String[] str={1,2,3}; List<String> childTb=new ArrayList(Arrays.asList(str));
HashSet<String> sub =this.getSub(userEntity.getId());
Sring[] strs=sub.toArray(new String[sub.size()]);