📜  char数组到arraylist java代码示例

📅  最后修改于: 2022-03-11 14:52:41.314000             🧑  作者: Mango

代码示例2
public char[] toArray(List list){
    char[] toReturn = new char[list.size()];
    int i = 0;
    for(char c : list)
        toReturn[i ++] = c;
    return toReturn;
}