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

题目内容 (请给出正确答案)

下列程序的输出结果是( )。

A.Catch---1

B.Catch---2

C.Catch---3

D.以上都不对


参考答案

更多 “ 下列程序的输出结果是( )。A.Catch---1B.Catch---2C.Catch---3D.以上都不对 ” 相关考题
考题 下列程序的输出结果是( )。 PublicclassTest{ Publicstaticvoidmain(String[]args){ int[]array=(2,4,6,8,10); intsize=6; intresult=-1; try{ for(inti=0;i<sizeresult==-1;) if(array[i]==20)result=i; } catch(ArithmeticExceptione){ System.out.println("Catch---1"); } catch(Array IndexOutOfBoundsExceptione){ System.out.println("Catch---2"); } catch(Exceptione){ System.out.println("Catch---3"); } }A.Catch---1B.Catch---2C.Catch---3D.以上都不对

考题 下面程序的输出结果是( )。 import java.awt.*; import java.applet.*; public class HelloApplet extends Applet { public void paint(Graphics g) { g.drawstring("Hello World!", 20, 20); } }A.20,20B.Hello World!C.编译不能通过D.以上都不对

考题 下列程序的输出结果是( )。A.Catch---1B.Catch---2C.Catch-3D.以上都不对

考题 下列程序的运行结果是( )。A.errorl:10.5B.error2C.errorl:10.5 error2SXB 下列程序的运行结果是( )。A.errorl:10.5B.error2C.errorl:10.5 error2D.以上都不对

考题 下列程序的输出结果是( )。A.编译未通过B.编译通过,但运行错误C.可以运行,但有错误D.以上都不对

考题 阅读下面程序 public class Cycle { public static void main(String[] args) { System.out.println(args[0]); } } 在命令行输入java Cycle one two,该程序输出的结果是A.CycleB.oneC.twoD.以上三个选项都不对

考题 下列程序的输出结果是( )。 Public class Test{ Public static void main(String[]args){ int[]array=(2,4,6,8,10); int size=6; int result=-l: try{ for(int i=0;isizeresult= =-1:) if(array[i]= =20)result=i: } catch(ArithmeticException e){ System.out.println("Catch---1"); } catch(ArraylndexOutOfBoundsException e){ System.out.println("Catch---2"): } catch(Exception e){ System.out.println("Catch---3"): } }A.Catch---1B.Catch---2C.Catch---3D.以上都不对

考题 下列程序的输出结果是( )。 public class Test{ public static void main(String[]args){ int[]array=(2,4,6,8,lO); int size=6; int result =-1: try{ for(int i=0;i(size 8Lresult= = -1;) if(array[i]= =20)result=i: } catch(ArithmeticException e){ System.out.println("Catch- - -l"); } catch(ArraylndexOutOfBoundsException e){ System.out.println("Catch- - -2"); } catch(Exception e){ System.out.println("Catch- - -3");) } }A.Catch- - -1B.Catch- - -2C.Catch- - -3D.以上都不对

考题 以下程序的输出结果是: nums=[1,2,3,4] nums.append([5,6,7,8]) print(len(nums)A.4B.5C.8D.以上都不对