Here you can find the source of toString(List
private static String toString(List<Character> list)
//package com.java2s; import java.util.List; public class Main { private static String toString(List<Character> list) { StringBuffer buffer = new StringBuffer(); for (Character character : list) { buffer.append(character);/*from w w w.j ava 2s . co m*/ } return buffer.toString(); } }