06 2014 档案
摘要:集合 有序否 允许元素重复否 Collection 否 是 List 是 是 Set AbstractSet 否 否 HashSet TreeSet 是(用二叉树排序) Map AbstractMap 否 使用key-value来映射和存储数据,Ke...
阅读全文
摘要:如果,需要一个函数来判断传入值的奇偶性,你会怎么做?这样?public boolean isOdd(int i) { return i % 2 == 1;}还是这样?public boolean isOdd(int i) { return i % 2 != 0;}很遗憾,第一种方式会错掉...
阅读全文