Here you can find the source of ListToString(List extends Object> lista)
public static String ListToString(List<? extends Object> lista)
//package com.java2s; //License from project: Apache License import java.util.List; public class Main { public static String ListToString(List<? extends Object> lista) { if (lista != null) return lista.toString().replaceAll("\\[", "") .replaceAll("\\]", ""); else// ww w . ja v a2 s . co m return ""; } /** * Transforma um objeto em String<br> * Caso obj seja nulo retorna nulo. * * @param obj * @return */ public static String toString(Object obj) { return obj != null ? obj.toString() : null; } }