1.hashset可以看Java关于hashset,hashmap的设计,应该是挺常见的; 2.多线程就加锁防并发更新即可,或者定义num成原子int 3.文件操作的通用步骤都是调用操作系统api:open read close。对应这边就是先open,然后读一点,读一点,读一点,流式读取计算。