天天看點

Java List<String>轉String[]

/**
 * 傳入List<?>傳回String[]資料
 * @return
 */
public static String[] getListDate(List<String> list){
	String[] strs = new String[list.size()];
	for (int i = 0; i < list.size(); i++) {
		strs[i] = list.get(i);
	}
	return strs;
	
}