随笔分类 -  java

摘要:/** 例如:int i = 1; i占用 4 字节,1字节 = 8bit, 32位,bit(正整数 = 00000000 00000000 00000000 00000001 负数=11111111 11111111 11111111 11111111) 数字(num) bit 1 ====== ... 阅读全文
posted @ 2018-08-24 09:41 wanghonglin 阅读(1564) 评论(0) 推荐(0)
摘要:注意:使用Vecor集合类的时候,需要注意一个问题。当使用Vecor进行迭代器操作的时候,如果其它线程正在执行add()或者remove()等操作的时候, 很有可能出现ConcurrentModificationException异常。这样会导致迭代器遍历的时候报错,导致无法遍历,严重影响程序的功能 阅读全文
posted @ 2018-08-01 14:06 wanghonglin 阅读(271) 评论(0) 推荐(0)
摘要:1 package test; 2 3 import java.util.AbstractCollection; 4 import java.util.ArrayList; 5 import java.util.Iterator; 6 import java.util.List; 7 import java.util.function.Predicate; 8 9 /** ... 阅读全文
posted @ 2018-07-26 16:22 wanghonglin 阅读(1069) 评论(0) 推荐(0)