摘要: 集合类说明及区别Collection├List│├LinkedList│├ArrayList│└Vector│ └Stack└SetMap├Hashtable├HashMap└WeakHashMapCollection接口 Collection是最基本的集合接口,一个Collection代表一组Object,即Collection的元素(Elements)。一些 Collection允许相同的元素而另一些不行。一些能排序而另一些不行。Java SDK不提供直接继承自Collection的类,Java SDK提供的类都是继承自Collection的“子接口”如List和Set。 所有实现Co.. 阅读全文
posted @ 2013-08-28 11:52 三星蓝 阅读(201) 评论(0) 推荐(0) 编辑
摘要: // 判断一个字符串是否都为数字 public boolean isDigit(String strNum) { return strNum.matches("[0-9]{1,}"); } // 判断一个字符串是否都为数字 public boolean isDigit(String strNum) { Pattern pattern = Pattern.compile("[0-9]{1,}"); Matcher matcher = pattern.matcher((CharSequence) strNum); return matcher.matches 阅读全文
posted @ 2013-08-28 09:07 三星蓝 阅读(424) 评论(0) 推荐(0) 编辑