1.IO流-->用于读写文件中的数据
2.IO流的分类
import java.io.FileOutputStream;
import java.io.IOException;
public class Stream {
public static void main(String[] args) throws IOException{
FileOutputStream fos=new FileOutputStream("abc\\a.txt");
fos.write(100);
fos.close();
}
}
3. FileInputStream
import java.io.FileOutputStream;
import java.io.IOException;
public class Stream {
public static void main(String[] args) throws IOException{
FileInputStream fis=new FileInputStream("abc\\a.txt");
int b1=fis.read();
System.out.println(b1);
fis.close();
}
}