可学答题网 > 问答 > java工程师信产部认证考试题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

在J2EE中,如果去编译并运行下面的代码,在这里假定在当前目录下没有Hel


在J2EE中,如果去编译并运行下面的代码,在这里假定在当前目录下没有Hello.txt文件: import java.io.*;  public class Mine {  public static void main(String argv[]){      Mine m=new Mine();  System.out.println(m.amethod());   }  public int amethod() {     try {  FileInputStream dis=new FileInputStream("Hello.txt");  }  catch (FileNotFoundException fne) {  System.out.println("No such file found");          return -1;     }  catch(IOException ioe)  { }     finally {  System.out.println("Doing finally");     }  return 0;   } }  结果会输出()。 

  • ANo such file found
  • BNo such file found -1
  • CNo such file found doing finally -1
  • D0
参考答案
参考解析:
分类:java工程师信产部认证考试题库