Here you can find the source of printStringList(List
Parameter | Description |
---|---|
listToPrint | the list to print. |
public static String printStringList(List<String> listToPrint)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { /**//from w w w. ja v a2 s . com * Prints the elements of a string list without leading and ending brackets. * * @param listToPrint * the list to print. * @return a string as a list of elements without leading and ending * brackets. */ public static String printStringList(List<String> listToPrint) { return listToPrint.toString().replace("[", "").replace("]", "").trim(); } }