Here you can find the source of toCharArrays(List
protected static char[][] toCharArrays(List<String> strings)
//package com.java2s; //License from project: Common Public License import java.util.List; import java.util.ListIterator; public class Main { protected static char[][] toCharArrays(List<String> strings) { char[][] charArrays = new char[strings.size()][]; for (ListIterator<String> it = strings.listIterator(); it.hasNext();) { int index = it.nextIndex(); charArrays[index] = it.next().toCharArray(); }//from ww w. j ava 2s .c o m return charArrays; } }