Here you can find the source of prettyPrint(Collection
public static String prettyPrint(Collection<String> allGroups)
//package com.java2s; //License from project: LGPL import java.util.Collection; public class Main { public static String prettyPrint(Collection<String> allGroups) { String toString = allGroups.toString(); return toString.substring(1, toString.length() - 1); }// ww w.jav a 2 s .c o m }