单项选择题

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

单项选择题
下列运算符中,( )是布尔逻辑运算符。
A.++
B.<<
C.‖
D.&
单项选择题
运行下面的程序时,会产生( )。 public class Test{ public static void main(String args[ ] ) { int x =0; int y = 2 x; int z[ ] = {1,2,4,6}; int p=z[4]; } }
A.ArrayIndexOutOfBoundsExcePtion异常
B.NumberFormatException异常
C.ArithmeticException异常
D.ArithmeticException异常和ArrayIndexOutOfBoundsExcePtion异常
相关试题
  • 在退出当前主页时,浏览器调用 【15】 ...
  • 字符类输出流的各个类都是抽象类 【11】...
  • 能将显示空间分成很多层的布局管理器是 【...
  • Java的输入输出流包括 【10】 、字符流...
  • Swing的顶层容器有:Japplet, JWindow,...