新手求问题还请大哥们帮忙!
学java 的时候有一个例外处理的程序!不懂!能不能解释一下!!谢谢!
import java.io.*;
class exceptiondemo{
public static void main(string arge[])throws IOException{
FileInputStream fis = null;
try{
system.out.println("first argument is "+args[0]);
fis = new fileinputstream("text");
system.out.println("content of text is :");
int b;
while((b=fis.read())!=-1){
system.out.priant((char)b);
}
}catch(filenotfoundexception e){
system.out.println(e);
}catch(ioexception e){
sysetm.out.println(e);
}catch(indexoutofboudsexception e){
system.out.println("closing fileinputstream..");
fis.close();
}else{
system.out.println("fileinputstream not open");
}
}
}
}
还请各位老大多多帮忙呀!