Here you can find the source of toString(Collection
Parameter | Description |
---|---|
strings | a Collection of strings |
public static String toString(Collection<String> strings)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { /**//from www .j a va 2 s. c om * Convert a Collection of strings to a line separated list of strings. * @param strings a Collection of strings * @return the resulting string representation */ public static String toString(Collection<String> strings) { String string = ""; for (Iterator<String> itr = strings.iterator(); itr.hasNext();) { string += itr.next() + "\n"; } return string; } }