单项选择题
执行下列程序之后,变量n的值为______。 public class Test{ public static void main(String[ ]args){ int y=2; int z=3; int n=4; n=n+-y*z/n; System.out.println(n); } }
A.3
B.-1
C.-12
D.-3
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
阅读下面的程序: public class Person{ int arr[ ]=Hew int[10]; public static void main(String args[ ]){ System.out.println(arr[1]); } } 正确的说法是______。
A.编译时将产生错误
B.编译时正确,运行时将产生错误
C.输出为0
D.输出为空
点击查看答案&解析
单项选择题
下列方法中,可以用来创建一个新线程的是______。
A.实现javlanRunnable接口并重写start( )方法
B.实现javlanRunnable接口并重写run( )方法
C.继承javlanThread类并重写run( )方法
D.继承javlanThread类并重写start( )方法
点击查看答案&解析
相关试题
下列选项中的 方法可以正确地加入类Child...
能将程序补充完整的选项是______。 ...
下面程序段的输出结果是______。 cl...