📄 fileinputstream1.java
字号:
import java.io.*;
public class FileInputStream1 {
public static void main(String[] args) {
FileInputStream fin = null;
try {
fin = new FileInputStream("d:\\share\\jproject\\io\\a.txt");
}catch(FileNotFoundException e) {
System.out.println("the file is not found now!!");
}
try {
int b = 0;
while((b=fin.read()) != -1) {
System.out.print((char)b);
}
}catch(IOException e) {
System.out.println("the file read is error!!");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -