Here you can find the source of toStringList(final E[] array)
@Deprecated public static <E> List<String> toStringList(final E[] array)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static <E> List<String> toStringList(final List<E> list) { List<String> stringList = null; if (list != null) { stringList = new ArrayList<String>(list.size()); for (E e : list) { if (e != null) { stringList.add(e.toString()); } else { stringList.add(null); }// w ww . j a va 2 s. c o m } } return stringList; } @Deprecated public static <E> List<String> toStringList(final E[] array) { List<String> list = new ArrayList<String>(array.length); for (int i = 0; i < array.length; i++) { list.add(array[i].toString()); } return list; } @Deprecated public static List<String> toStringList(final double[] array) { List<String> list = new ArrayList<String>(array.length); for (int i = 0; i < array.length; i++) { list.add(String.valueOf(array[i])); } return list; } @Deprecated public static List<String> toStringList(final int[] array) { List<String> list = new ArrayList<String>(array.length); for (int i = 0; i < array.length; i++) { list.add(String.valueOf(array[i])); } return list; } public static <E> String toString(final List<E> list) { return toString(list, "\t"); } public static <E> String toString(final List<E> list, String separator) { StringBuilder sb = new StringBuilder(); if (list != null && list.size() > 0) { for (int i = 0; i < list.size() - 1; i++) { if (list.get(i) != null) { sb.append(list.get(i).toString()).append(separator); } else { sb.append("null").append(separator); } } if (list.get(list.size() - 1) != null) { sb.append(list.get(list.size() - 1).toString()); } else { sb.append("null"); } } return sb.toString(); } }