zoukankan      html  css  js  c++  java
  • 中英文字符的读取—FileRead

    import java.io.FileReader;
    import java.io.IOException;
    import java.nio.file.FileVisitResult;
    
    public class Demo03Read {
        public static void main(String[] args) throws IOException {//字符流读取字符
            FileReader fr=new FileReader("F:\basic\untitled13\src\it\cast\day15\demo01\2.txt");
         /*   int len=0;
            while ((len=fr.read())!=-1){
                System.out.print((char) len);
            }*/
            int len=0;
            char[] cs=new char[1024];
            while ((len=fr.read(cs))!=-1){
                System.out.println(new String(cs,0,len));
            }
    
            fr.close();
        }
    }
  • 相关阅读:
    F. 数学上来先打表
    LibreOJ β Round #2
    noip飞扬的小鸟
    jxoi2017
    分块算法
    Chino的数列
    cf 613E
    cf 126D
    cf 542E
    cf 512D
  • 原文地址:https://www.cnblogs.com/cy2268540857/p/13777411.html
Copyright © 2011-2022 走看看