如何把ArrayList转化成一个String[]呢;
static ArrayList <SelectItem> selectProgramNameList = new ArrayList <SelectItem> ();
ArrayList中有数据,放到String[]a;中
------解决方案--------------------String [] arr = new String[];
int i = 0;
for(String str : arrayList){
arr[i++] = str;
}
------解决方案--------------------(String[])rBasicBean.getSelectProgramNameList().toArray()
------解决方案--------------------(String[])selectProgramNameList.toArray()
------解决方案--------------------String [] arr = new String[];
int i = 0;
for(String str : arrayList){
arr[i++] = str;
}
这样可行