java.io.BufferedReader.BufferedReader()のサンプル

Javaコード
package itstudy;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public class BufferDemoAk {

public static void main(String[] args) {
try {

String cft;
FileReader fr = new FileReader(“C:\\study\\20180228.txt");
BufferedReader breader = new BufferedReader(fr);
cft = breader.readLine();
while (cft != null) {
System.out.println(cft);
cft = breader.readLine();
}
breader.close();
fr.close();
} catch (IOException e) {
System.out.println(“エラーメッセージ:" + e);
}

}

}

Java

Posted by arkgame