Here you can find the source of printlnStringHashSet(HashSet
public static void printlnStringHashSet(HashSet<String> hashSet)
//package com.java2s; //License from project: Open Source License import java.util.HashSet; import java.util.Iterator; public class Main { public static void printlnStringHashSet(HashSet<String> hashSet) { System.out.print("["); for (Iterator<String> it = hashSet.iterator(); it.hasNext();) { System.out.println(it.next() + ", "); }//w w w. jav a2s. c o m System.out.print("]"); System.out.println(""); } }