为什么在包里面新建的file记事本中输入英文,运行结果会是数字?那我如果在file记事本中输入数字又会怎样?package liaoqi;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
public class CatchException {
public static void main(String[]args) {
FileInputStream fis=null;
try {
fis=new FileInputStream("test.txt");
int b;
while((b=fis.read())!=-1) {
System.out.print(b);
}
}catch(FileNotFoundException e) {
System.out.println("Error:"+e.getMessage());
}catch(IOException e) {
System.out.println("Error:"+e.getMessage());
}finally {
try {
if(fis!=null) {
fis.close();
}
}catch(IOException e) {
}
}
}
}