![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
javaIO
Lntower
努力不一定会有结果,但努力的过程会让我变得越来越优秀
展开
-
IO流:读取文本,然后统计每个字符出现的个数
public static void main(String[] args) throws IOException { File file = new File ("C:\\Users\\Administrator\\Desktop\\a.txt"); //统计每个字符出现的个数 Reader reader = new FileReader (file); Map<Character, Integer> map = new Ha..原创 2021-06-01 10:46:55 · 549 阅读 · 0 评论 -
IOl:从文件夹中找到后缀名为TXT的文件,然后复制到指定的文件夹
/** * 从文件夹中找到后缀名为TXT的文件,然后复制到指定的文件夹 * @param args * @throws IOException */ public static void main(String[] args) throws IOException { File file = new File ("C:\\Users\\Administrator\\Desktop\\game2"); File file1 = n原创 2021-06-01 10:15:11 · 438 阅读 · 0 评论 -
IO流:查找C盘目录下的TXT文件,存储到list集合
/** *查找C盘目录下的TXT文件,存储到list集合 * @param args */ public static void main(String[] args) { /*List<File> list = find (new File ("c:/"), ".txt");*/ /*find1 (new File ("c:/"), ".txt");*/ ArrayList<File> l = .原创 2021-05-31 20:53:15 · 313 阅读 · 0 评论