Java中List转换为数组,数组转List

ArrayList<String> list=new ArrayList<String>();

String[] strings = new String[list.size()];

list.toArray(strings);

 

String[] s = {"a","b","c"};
List list = java.util.Arrays.asList(s);

 

posted on 2017-05-31 17:14  神啊bin  阅读(208)  评论(0编辑  收藏  举报

导航