阅读下列代码后正确的说法是( )。
A.编译时将产生错误
B.编译时正确,运行时将产生错误
C.输出零
D.输出空
第1题:
下列代码经过编译将输出()。
A.99
B.0
C.编译出错
D.运行出错
第2题:
对下列程序的叙述中,正确的是( )。
A.第1行会产生编译错误
B.第6行会产生编译错程
C.第6行会产生运行错误
D.程序正常运行
第3题:
阅读下面代码 public class Person { static int arr[]=new int[10]; public static void main(String args) { System.out.println(arr[9]); } } 该代码的运行结果是
A.编译时将产生错误
B.编译时正确,运行时将产生错误
C.输出零
D.输出空
第4题:
给出下列的程序,其叙述正确的是public class Man { static int arr[]= new int [10]; public static void main (String a []){ System.out.println(arr[1]); }}
A.编译时将发生错误
B.编译时正确但是运行时出错
C.输出为0
D.输出为null
第5题:
对下列程序的叙述中,正确的是( )。
A.第1行会产生编译错误
B.第6行会产生编译错误
C.第6行会产生运行错误
D.程序正常运行
第6题:
阅读下列代码后 publicclass Person{ intarr[]=new int[10]; publicstaticvoidmain(Stringargs[]){ System.out.println(alt[1]); } } 正确的说法是( )。
A.编译时将产生错误
B.编译时正确,运行时将产生错误
C.输出零
D.输出空
第7题:
对于下列代码正确的说法是()
A.编译时将产生错误
B.编译时正确,运行时将产生错误
C.输出零
D.输出空
第8题:
A.编译错误;
B.运行输出 "Hello cruel world";
C.编译无错,但运行时指示没有定义构造方法。
D.编译无错,但运行时指示没有正确定义main方法。
第9题:
假设在某JSP页面中存在“〈s:property〉”代码,则以下说法正确的是()。
第10题:
"分析下面这行代码if(5&7>0&&5|2)Systen.out.println(""true""),选择唯一正确的说法()"
第11题:
第2行编译出错
第4行编译出错
编译时产生错误
编译时没有产生错误,运行时发生异常
第12题:
编译JSP页面时会出现错误
编译JSP页面时不会出现错误,但页面不会显示任何内容
该代码用于输出位于ValueStack(值栈)栈顶的对象
以上说法都不正确
第13题:
classOrder3implementsRunnable{publicstaticvoidmain(String[]args){newThread(newOrder3()).start();for(intx=0;x〈10;x++)System.out.print("m");}publicvoidrun(){for(intx=0;x〈10;x++){//insertcodehereSystem.out.print("r");}}}和:当代码被编译并照此运行时产生"before"的输出,当下列内容插入到代码第8行时产生"after"输出if(x〉3&&x〈7)Thread.yield();对比before”的输出结果和after”的输出结果,下面哪一项是正确的?()
A.输出字符的总数可能改变。
B.当添加额外的代码时,编译将失败。
C.在“after”输出结果中,字符“m”较早出现的可能性较小。
D.在“after”输出结果中,字符“m”较早出现的可能性较大。
第14题:
阅读下列程序:class ThreadTest extends Thread{ public static void main(String[]args){ Thread t=new Thread(this); t.start(); } public void run(){ System.out.print("A thread test."); }} 对该程序而言,正确结论是 ( )
A.该程序能够通过编译并打印输出“A thread test.”
B.该程序能够通过编译,但运行时将不调用ThreadTest类中的run()方法,因此不产生任何输出
C.该程序存在编译错误,因为在main()方法中不能使用this指针
D.上述选项都不正确
第15题:
阅读下列代码 publicclassPerson{ staticintalt[]=newint[[10]; public static voidmain(Stringargs){ System.out.println{all[9]); } } 该代码的运行结果是( )。
A.编译时将产生错误
B.编译时正确,运行时将产生错误
C.输出零
D.输出空
第16题:
阅读下列代码: public class Person{ static int arr[]=new int[10]; public static void main(String args){ System.out.println{arr[9]); } } 该代码的运行结果是( )。
A.编译时将产生错误
B.编译时正确,运行时将产生错误
C.输出零
D.输出空
第17题:
阅读下列代码:该代码的运行结果是( )。
A.编译时将产生错误
B.编译时正确,运行时将产生错误
C.输出零
D.输出空
第18题:
关于以下程序段的执行结果,说法正确的是()。publicclassborleyextendsThread(publicstaticvoidmain(Stringargv[]){borleyb=newborley();b.start();}publicvoidrun(){System.out.println("running");}}
A.编译通过并执行,但无输出
B.编译通过并执行,输出:running
C.产生错误,没有thread类对象
D.产生错误,没有通道到达thread包
第19题:
给出下面的程序: public class ex49 { static int arr[] = new int[10]; public static void main(String args [] ) { System.out.println (art [1] ); } } ______叙述是正确的。
A.编译时将发生错误
B.输出为 null
C.输出为0
D.编译时正确但是运行时出错
第20题:
A. 编译时将产生错误;
B. 编译时正确,运行时将产生错误;
C. 输出0;
D. 输出null。
第21题:
关于以下程序段的说法正确的是()。 1.publicclassMyar{ 2.publicstaticvoidmain(Stringargv[]){ 3.int[]i=newint[5] 4.System.out.println(i[5]) 5.}
第22题:
在JAVA语言中,为将源代码翻译成()文件时产生的错误称为编译错误。而将程序在运行中产生的错误称为运行错误。
第23题:
这行代码不能编译
代码编译,无任何输出
代码编译,输出true
代码编译,输出false