摘要: 递归方法 用到了File类的exist,isFile,listFiles,getPath,getName 1 public static void findall(File file ) { 2 if(!file.exists())System.out.print("文件不存在!"); 3 if(f 阅读全文
posted @ 2020-04-07 23:51 盖世阿萌 阅读(1651) 评论(0) 推荐(0)
摘要: 既然说到词频,那肯定是要用键值对来保存单词和对应的次数了。 这里插入一下HashMap和TreeMap: HashMap:基于哈希表实现。使用HashMap要求添加的键类明确定义了hashCode()和equals()[可以重写hashCode()和equals()],为了优化HashMap空间的使 阅读全文
posted @ 2020-04-07 12:57 盖世阿萌 阅读(453) 评论(0) 推荐(0)