catch (FileNotFoundException e) 这个e是什么意思啊?

解决方案 »

  1.   

    等同 int i = 0;的i
    用 e 引用拋出的FileNotFoundException 異常
      

  2.   

    e为FileNotFoundException的对象
    当试图打开指定路径名表示的文件失败时,抛出此异常。
      

  3.   

    FileNotFoundException 的一个实例
      

  4.   

    简单地说,FileNotFoundException e,就相当于int e,或是Integer e;
    声明一个变量而已。
    深奥一点地说,当发生异常时,会产生一个异常对象(如:new IOException())赋值到e中。
      

  5.   

    这里的e指如果try块出错,则创建异常类FileNotFoundException的实例并用catch捕获,就这么简单
      

  6.   

    catch (FileNotFoundException e)
    FileNotFoundException 是类,指找不到文件,e是这个类的实例,一个变量而已,你想叫什么就叫什么.
      

  7.   

    接收文件找不到(FileNotFoundException类型)的异常E是FileNotFoundException的一个对象
      

  8.   

    补一句,e这个变量的值是由运行环境自动赋值的,
    try{

    }catch(FileNotFoundException e){
    //我在这等着,发生FileNotFoundException文件找不到异常的时候,环境会把异常信息封在
    //变量e里传给我
    //e 里面包含了此异常的丰富信息,我这里只管处理,不关心谁给我的
    }