Here you can find the source of arrayToList(char[] charArr)
public static List<Character> arrayToList(char[] charArr)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import java.util.List; public class Main { public static List<Character> arrayToList(char[] charArr) { List<Character> chList = new ArrayList<>(charArr.length); for (char ch : charArr) { chList.add(ch);// w ww . j a va 2s.com } return chList; } }