单项选择题

执行下列程序之后,变量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
<上一题 目录 下一题>
热门 试题

单项选择题
下面程序段的输出结果是______。 class Test public static void main(String args[ ]) MyThread t=new MyThread( ); t.displayOutput( t has been created ); t.start( ); class MyThread extends Thread public void display Output(String s) System.out,println(s); public void run( ) displayOutput( t is running );
A.t has been created
t is running
B.t has been created
C.t is running
D.编译错误
单项选择题
在下列命令中,是Java编译命令的是______。
A.javac
B.java
C.javadoc
D.appletviewer
相关试题
  • 如果有一个类MyFrame是Frame类的子类,但它...
  • Java运行时,系统通过______周期性地...
  • int型public成员变量MAX_LENGTH的值保持为...
  • 下列程序的功能是创建一个显示5个“Hello...
  • 所有由Container派生的类称为______...