📜  将字符数组列表转换为数组 - Java 代码示例

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

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