How to add File [] Array content into ArrayList?
This question already has an answer here:
尝试这个
tempList.addAll(Arrays.asList(temp));
使用以下
List<File>tempList = Arrays.asList(temp);
您可以遍历数组并将每个元素添加到列表中。
for (File each : temp)
tempList.add(each);
链接地址: http://www.djcxy.com/p/17632.html