Here you can find the source of toString(List
private static String toString(List<Character> c)
//package com.java2s; /****************************************************************** * License: GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html * * Copyright (c) 2016 {slash.bin /bin} http://slashb.in * ******************************************************************/ import java.util.List; public class Main { private static String toString(List<Character> c) { if (c == null) return null; final StringBuffer s = new StringBuffer(c.size()); for (int i = 0; i < c.size(); i++) { s.append(c.get(i));//from www . j ava2 s. c om } return s.toString(); } }