单项选择题
执行下列程序之后,变量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( )方法
点击查看答案&解析
相关试题
下列程序的功能是创建一个显示5个“Hello...
如果有一个类MyFrame是Frame类的子类,但它...
一个类只有实现了______接口,其对象...
int型public成员变量MAX_LENGTH的值保持为...
所有由Container派生的类称为______...