Here you can find the source of toCharArray(Collection
public static List<char[]> toCharArray(Collection<String> patterns)
//package com.java2s; //License from project: LGPL import java.util.ArrayList; import java.util.Collection; import java.util.List; public class Main { public static List<char[]> toCharArray(Collection<String> patterns) { List<char[]> charpatterns = new ArrayList<char[]>(patterns.size()); for (String pattern : patterns) { charpatterns.add(pattern.toCharArray()); }/*w w w.jav a2s .c om*/ return charpatterns; } }