List的字符串容器转数组

来源:互联网 发布:知乎年度吐槽精选 编辑:程序博客网 时间:2024/05/20 01:37

免得自己又忘记了,这里记一下。

String[] Extract1DListFromMem(String filePath,int sheetIndex,String ColNameInExcel)
 throws Exception
 {

//这里ignore若干条代码

List<String> listClass = new ArrayList<String>();

 

//这里ignore若干条代码

return listClass.toArray(new String[list.size()]);

}

原创粉丝点击