public static String displaySet(String setName,Set<String> set){
  StringBuilder sb=new StringBuilder();
  sb.append(setName);
  sb.append(":\n");
  if (set.isEmpty()) {
    sb.append("None\n");
  }
 else {
    int count=0;
    for (    String value : set) {
      sb.append("  [");
      sb.append(++count);
      sb.append("] ");
      sb.append(value);
      sb.append("\n");
    }
  }
  return sb.toString();
}

public static String displaySet ( String setName , Set < String > set ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( setName ) ; sb . append ( ":\n" ) ; if ( set . isEmpty ( ) ) { sb . append ( "None\n" ) ; } else { int count = 0 ; for ( String value : set ) { sb . append ( "  [" ) ; sb . append ( ++ count ) ; sb . append ( "] " ) ; sb . append ( value ) ; sb . append ( "\n" ) ; } } return sb . toString ( ) ; }
display the values in a set
