两种打印hash表的方法
(HT36ValidSudoku)
private static void printSet(Set s) {
// Iterator is = s.iterator();
// while(is.hasNext()) {
// System.out.println(is.next());
// }
Object[] a = s.toArray();
for(Object x : a){
System.out.println(x);}
}
定义方法
Set s = new HashSet();
from HT36ValidSudoku- 比较两个set用
_Set.equals(_Set)
不要用==