Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 2020/4/25(土)
- import java.io.*;
- public class ExceptionTest {
- public static void main(String[] args) {
- FileReader fr = null;
- BufferedReader br = null;
- String line = null;
- try(fr = new FileReader("matrixA.txt");
- br = new BufferedReader(fr);) {
- while((line = br.readLine()) != null) {
- System.out.println(line);
- }
- } catch(FileNotFoundException e1) {
- e1.printStackTrace();
- } catch(IOException e2) {
- e2.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement