
IO
牧儿
Hope is a good thing,maybe the best of things.And no good thing ever dies!
展开
-
IO流知识点总结
1. 在IO流中,我们如果要想操作文件,需要用到哪个类?答:File类。 2. 对于File类的用法,我们通常会用File类来封装一个文件的绝对路径,代码怎么实现的?答:File file = new File(“e://a.txt”); 3. Java中IO流的分类?答:按流向分,可分为输入流和输出流;按数据类型分,可以分为字节流和字符流。 4. Java IO类在设计时采用了Decorator...原创 2018-04-06 21:00:21 · 351 阅读 · 0 评论 -
统计文件中单词出现的频次
public class Util{ public static void main(String[] args) throws IOException { //键盘录入指定文件名 Scanner sc = new Scanner(System.in); String fileName = sc.nextLine(); //...原创 2018-09-12 12:23:24 · 769 阅读 · 0 评论