岳麓丹枫 L180 2015-08-13 21:28:24 输入输出
1351 0

“J2SE核心开发实战”实验报告

输入输出
package com.shiyanlou.lxm;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class FileTest {

    public static void main(String[] args) throws IOException {
        FileInputStream fileInputStream = new FileInputStream("../../Desktop/aa.txt");
        s
        int b = 0;
        while((b= fileInputStream.read())!=-1)
        {
            System.out.println(b);
        }
        
    }
}
copy

package com.shiyanlou.lxm;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class FileTest {

    public static void main(String[] args) throws IOException {
        FileInputStream fileInputStream = new FileInputStream("../../Desktop/aa.txt");
        s
        int b = 0;
        while((b= fileInputStream.read())!=-1)
        {
            System.out.println(b);
        }
        
    }
}
copy

最新评论
暂无评论~