摘要: Character.isDigit(string.charAt(index)) //如果index位置的字符是数字 返回true Character.isLetter(string.charAt(index)) //如果index位置的字符是字母 返回true Character.isLetterO 阅读全文
posted @ 2018-08-06 20:26 安琪拉的博客(公众号) 阅读(376) 评论(0) 推荐(0) 编辑
摘要: 需求:我要在map中判断是否存在key,存在则让key对应的value = value+1,否则设置<key,value=1> 代码实现方式如下: ContainsKey TestForNull AtomicLong Trove MutableInt 还有Java8的方法: Map.merge(ke 阅读全文
posted @ 2018-08-06 20:22 安琪拉的博客(公众号) 阅读(1981) 评论(1) 推荐(0) 编辑