单项选择题

设有如下程序: public class Sun { public static void main(String args[ ]) { int x, y; x-4; y=0; if(Math.pow(x,2)==16) y=x; if(Math.pow(x,2)<15) y=1/x; if(Math.pow(x,2)>15) y=(int)Math.pow(x,2)+1; System.out.println(y); } } 程序的运行结果是( )。

A.4
B.17
C.18
D.0.25
<上一题 目录 下一题>
热门 试题

单项选择题
有下面程序段: Public class ArrayTest { Public static void main(String args[]) { int[] intArray=new int[3]; for(int I=0;I<3;I++) { intArray[I]=I+2; System.out.println( IntArray[ +I+ ] - +intArray[I]); } System.out.println( ------------ ); Int arrLen=4; IntArray=new int[arrLen]; For(int j=intArray.length;j>=0;j--} { intArray [j]=j*3; System. out.println( hello +intArray[j]); } } } 则运行的结果是( )。
A.编译出错
B.编译通过,但运行出错
C.可以运行,但有错误
D.以上都不对
单项选择题
数据库系统的核心是( )。
A.数据库
B.数据库管理系统
C.数据模型
D.软件工具
相关试题
  • 自定义的异常类可从下列哪个类继承 ( )
  • 下列组件不能添加进Frame主窗口的是( )...
  • Thread类的方法中用于修改线程名字的方法是...
  • 关于集合类描述正确的是( )。 Ⅰ集合类...
  • 下列代码的执行结果是( )。 public cl...