网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
单选题
下面的异常()为输入输出访问异常。
A

Null Pointer Exception

B

File Not Found Exception

C

Array lndex Out Of Bounds Exception

D

IO Exception


参考答案

参考解析
解析: 暂无解析
更多 “单选题下面的异常()为输入输出访问异常。A Null Pointer ExceptionB File Not Found ExceptionC Array lndex Out Of Bounds ExceptionD IO Exception” 相关考题
考题 publicstaticvoidmain(String[]args){try{args=null;args[0]=test”;System.out.println(args[0]);}catch(Exceptionex){System.out.println(”Exception”);}catch(NullPointerExceptionnpe){System.out.println(”NullPointerException”);}}Whatistheresult?()A.testB.ExceptionC.Compilationfails.D.NullPointerException

考题 11.classa{12.publicvoidprocess(){System.out.print(”a,”);}}13.classbextendsa{14.publicvoidprocess()throwsIOException{15.super.process();16.System.out.print(”b,”);17.thrownewIOException();18.}}19.publicstaticvoidmain(String[]args){20.try{newb().process();}21.catch(IOExceptione){System.out.println(”Exception”);}}Whatistheresult?()A.ExceptionB.a,b,ExceptionC.Compilationfailsbecauseofanerrorinline20.D.Compilationfailsbecauseofanerrorinline14.E.ANullPointerExceptionisthrownatruntime.

考题 try{if((newObject))(.equals((newObject()))){System.out.println(equal”);}else{System.out.println(notequal”);}}catch(Exceptione){System.out.println(exception”);}Whatistheresult?() A.equalB.notequalC.exceptionD.Compilationfails.

考题 请问所有的异常类都继承下面的______类。A.java.lang.ExceptionB.java.lang.ThrowableC.java.io.ExceptionD.java.lang.Error

考题 请阅读下列程序代码,然后将程序的执行结果补充完整。横线处应填写的内容是( )。 程序代码: public class throwsExeeption{ static void Proc(intsel) throws Arithmetic Exception,Array Index Out Of Bounds Exception{ System.out.println("InSituation"+sel); if(sel= =0){ System.OUt.println("noException caught"); return; } else if(sel= =l){ int iArray[]=newint[4]; iArray[1]=3; } } public static void main(String args[]){ try{ Proe(O); Proc(1); } catch(Array Index Out Of Bounds Exception e){ System.out.println("Catch"+e); } finally{ System.out.println("inProcfinally"): } } } 执行结果: In Situation 0 no Exception caught in Proc finallyA.In Situation lB.In SituationC.with CatchD.int iArray l

考题 下面的异常()为数组下标越界异常。A、Arithmetic ExceptionB、Null Pointer ExceptionC、Array Index Out Of Bounds ExceptionD、File Not Found Exception

考题 static void test() {  try {  String x=null;  System.out.print(x.toString() +“ “);  }  finally { System.out.print(“finally “); }  }  public static void main(String[] args) {  try { test(); }  catch (Exception ex) { System.out.print(”exception “); }  }  What is the result?() A、 nullB、 finallyC、 null finallyD、 Compilation fails.E、 finally exception

考题 Arthmetic Exception类表示算术异常,Arrays Index Out Of Bounds Exception表示()异常。

考题 下面的异常()为文件没有找到异常。A、Null Pointer ExceptionB、File Not Found ExceptionC、Array lndex Out Of Bounds ExceptionD、IO Exception

考题 下面的异常()为输入输出访问异常。A、Null Pointer ExceptionB、File Not Found ExceptionC、Array lndex Out Of Bounds ExceptionD、IO Exception

考题 所有C#异常都派生自()类。A、WindowsB、ExceptionC、Common.ExceptionD、System.Exception

考题 下列常见的系统定义的异常中,属于主机网络故障异常的是()。A、Class Not Found ExceptionB、IOExceptionC、File Not Found ExceptionD、Unknown Host Exception

考题 在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;   } }  结果会输出()。 A、No such file foundB、No such file found -1C、No such file found doing finally -1D、0

考题 try {  int x = 0;  int y = 5 / x;  } catch (Exception e) {  System.out.println(“Exception”);  } catch (ArithmeticException ae) {  System.out.println(“Arithmetic Exception”);  }  System.out.println(“finished”);  What is the result?()  A、 finishedB、 ExceptionC、 Compilation fails.D、 Arithmetic Exception

考题 public static void main(String[] args) {  try {  args=null;  args[0] = “test”;  System.out.println(args[0]);  } catch (Exception ex) {  System.out.println(”Exception”);  } catch (NullPointerException npe) {  System.out.println(”NullPointerException”);  }  }  What is the result?() A、 testB、 ExceptionC、 Compilation fails.D、 NullPointerException

考题 11.classA {  12. public void process() { System.out.print(”A “); } }  13. class B extends A {  14. public void process() throws RuntimeException {  15. super.process();  16. if (true) throw new RuntimeException();  17. System.out.print(“B”); }}  18. public static void main(String[] args) {  19. try { ((A)new B()).process(); }  20. catch (Exception e) { System.out.print(”Exception “); }  21. }  What is the result?() A、 ExceptionB、 A ExceptionC、 A Exception BD、 A B ExceptionE、 Compilation fails because of an error in line 14.F、 Compilation fails because of an error in line 19.

考题 try {  if ((new Object))(.equals((new Object()))) {  System.out.println(“equal”);  }else{  System.out.println(“not equal”);  }  }catch (Exception e) {  System.out.println(“exception”);  }   What is the result? () A、 equalB、 not equalC、 exceptionD、 Compilation fails.

考题 单选题static void test() {  try {  String x=null;  System.out.print(x.toString() +“ “);  }  finally { System.out.print(“finally “); }  }  public static void main(String[] args) {  try { test(); }  catch (Exception ex) { System.out.print(”exception “); }  }  What is the result?()A  nullB  finallyC  null finallyD  Compilation fails.E  finally exception

考题 单选题下面的异常()为数组下标越界异常。A Arithmetic ExceptionB Null Pointer ExceptionC Array Index Out Of Bounds ExceptionD File Not Found Exception

考题 单选题public static void main(String[] args) {  try {  args=null;  args[0] = “test”;  System.out.println(args[0]);  } catch (Exception ex) {  System.out.println(”Exception”);  } catch (NullPointerException npe) {  System.out.println(”NullPointerException”);  }  }  What is the result?()A  testB  ExceptionC  Compilation fails.D  NullPointerException

考题 单选题下列常见的系统定义的异常中,属于主机网络故障异常的是()。A Class Not Found ExceptionB IOExceptionC File Not Found ExceptionD Unknown Host Exception

考题 单选题11.classA {  12. public void process() { System.out.print(”A “); } }  13. class B extends A {  14. public void process() throws RuntimeException {  15. super.process();  16. if (true) throw new RuntimeException();  17. System.out.print(“B”); }}  18. public static void main(String[] args) {  19. try { ((A)new B()).process(); }  20. catch (Exception e) { System.out.print(”Exception “); }  21. }  What is the result?()A  ExceptionB  A ExceptionC  A Exception BD  A B ExceptionE  Compilation fails because of an error in line 14.F  Compilation fails because of an error in line 19.

考题 单选题下面的异常()为文件没有找到异常。A Null Pointer ExceptionB File Not Found ExceptionC Array lndex Out Of Bounds ExceptionD IO Exception

考题 单选题try {  int x = 0;  int y = 5 / x;  } catch (Exception e) {  System.out.println(“Exception”);  } catch (ArithmeticException ae) {  System.out.println(“Arithmetic Exception”);  }  System.out.println(“finished”);  What is the result?()A  finishedB  ExceptionC  Compilation fails.D  Arithmetic Exception

考题 单选题try {  if ((new Object))(.equals((new Object()))) {  System.out.println(“equal”);  }else{  System.out.println(“not equal”);  }  }catch (Exception e) {  System.out.println(“exception”);  }   What is the result? ()A  equalB  not equalC  exceptionD  Compilation fails.

考题 单选题在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;   } }  结果会输出()。A No such file foundB No such file found -1C No such file found doing finally -1D 0

考题 填空题Arthmetic Exception类表示算术异常,Arrays Index Out Of Bounds Exception表示()异常。