网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
单选题
“System.out.println(Math.floor(-2.1));”的打印结果是什么()。
A

-2

B

2.0

C

-3

D

-3.0


参考答案

参考解析
解析: 暂无解析
更多 “单选题“System.out.println(Math.floor(-2.1));”的打印结果是什么()。A -2B 2.0C -3D -3.0” 相关考题
考题 研究下面的Java代码:switch(x){case1:System.out.println(1);case2:case3:System.out.println(3);case4:System.out.println(4);}当x=2时,运行结果是()。 A.没有输出任何结果B.输出结果为3C.输出结果是3和4D.输出结果是1、3和4

考题 下列代码中if(xO){System.out.println(first);}elseif(x-3){System.out.println(second);)else{System.out.println(third);)要求打印字符串为“second”时,X的取值范围是( )。A.x-3B.x>0C.x>-3D.x

考题 下列代码中if(x>0){System.out.println("first");} else if(x>-3)(System.out.println("second");} else{ System.out.println("third");}要求打印字符串为"second"时,x的取值范围是A.x<=0 并且 x>-3B.x>0C.x>-3D.x<=-3

考题 ( 7 )能打印出一个双引号的语句是 System.out.println{ “ 【 7 】 ” } ;

考题 int a =’A’,请问System.out.println(a)打印出什么?() A.65B.AC.aD.97

考题 已知如下代码: boolean m = true; if ( m = false ) System.out.println("False"); else System.out.println("True"); 执行结果是什么?() A.FalseB.TrueC.编译时出错D.运行时出错

考题 给出下面程序段if(x>0){System.out.println“Hello.“;}elseif(x>-3){System.out.println“Nicetomeetyou“;}else{System.out.println“Howareyou“;}若打印字符串“Howareyou”,则x的取值范围是()。 A.x>0B.x>-3C.xD.x-3

考题 函数Math.Floor(15.8)的返回值为16。()

考题 classWhileTests{publicstaticvoidmain(String[]args){intx=5;while(++x〈3){--x;}System.out.println(x=+x);}}结果是什么?() A.x=2B.x=5C.x=6D.编译失败

考题 先阅读下面的程序片段:String str="abccdefcdh";String[] arr=str.split"c";System.out.println(arr.length);程序执行后,打印的结果是( )。 A、2个B、3个C、4个D、5个

考题 下面程序输出的结果是什么? ( ) public class Quiz2 { public static void main(String args[]) { try {throw new MyException(); }catch(Exception e) { System.out.println("It's caught!"); }finally{ System.out.println("It's finally caught!"); } } } class MyException extends Exception{}A.It's finally caught!B.It's caught!C.It's caught!/It's finally caught!D.无输出

考题 阅读下列程序片段 Publicvoidtest(){ Try{ sayHello(); system.out.println(“hello"); }catch(ArrayIndexOutOfBoundExceptione){ System.out.println(“ArraylndexOutOfBoundException”); }catch(Exceptione){ System.out.println(“Exception”); }finally{ System.out.println(“finally”); } } 如果sayHello()方法正常运行,则test()方法的运行结果将是( )。A.HelloB.ArraylndexOutOfBondsExceptionC.Exception FinallyD.Hello Finally

考题 有如下的代码段,当编译和运行时,下列各选项中说法正确的是( )。 public class Z { public static void main(String args[]) { new Z(); } Z() { Z aliasl=this; Z alias2=this; synchronized(aliasl) { try{ alias2.walt(); System.out.println("DONE WAITING"); } catch(InterruptedException e) { System.out.println("INTERR UPTED"); } catch (Exception e) { System.out.println("OTHER EXCEPTION"); } finally{ System.out.println("FINALLY"); } } System.out.println("ALL DONE"); } }A.应用程序编译正常,但是不打印任何数据B.应用程序编译正常,并打印数据“DONE WAITING”C.应用程序编译正常,并打印数据“FINALLY”D.应用程序编译正常,并打印数据“ALL DONE”

考题 下列代码中 if(xO){System.out.println("first");} elseif(x-3){System.out.println("second");) else{System.out.println("third");) 要求打印字符串为“second”时,X的取值范围是( )。A.x=0且x-3B.x0C.x-3D.x=-3

考题 给出下列代码片断: if(x>0) {System.out.println("first");} else if(x>-3){System.out.println("second");} else{System.out.println("third");} 请问x处于什么范围时将打印字符串“second”?( )A.x>0B.x>-3C.x<=3D.x<=0x>-3

考题 本题的功能是求1~100的自然数的累加,并打印输出计算结果。public class javal{public static void main(String[]args){int sum=0;int i=1;for(;;){if( ){sum=sum+i:}else’;}System.OUt.println("sums="+sum);}}

考题 给出下列代码片段: if(x>0){System.out.println("first");} else if(x>-3){System.out.println("second");} else{System.out.println("third");} 当x处于( )范围时打印字符串"second"。A.x>0B.x>-3C.-3<x<=0D.x<=-3

考题 ( 12 )代码 System.out.println(066) 的输出结果是 【 12 】 。

考题 “System.out.println(Math.floor(-2.1));”的打印结果是什么()。A、-2B、2.0C、-3D、-3.0

考题 研究下面的Java代码:  switch (x) {  case 1:  System.out.println(1);  case 2:  case 3:  System.out.println(3);  case 4:  System.out.println(4); }  当x=2时,运行结果是()。 A、没有输出任何结果B、输出结果为3C、输出结果是3和4D、输出结果是1、3和4

考题 System.out.println(4|3)能打印出什么结果()A、6B、0C、1D、7

考题 下列正确的代码分别是?()A、Math.ceil(7.25)===7B、Math.ceil(7.25)===8C、Math.floor(7.25)===7D、Math.floor(7.25)===8

考题 以下()表达式产生一个0~7之间(含0,7)的随机整数。A、Math.floor(Math.random()*6)B、Math.floor(Math.random()*7)C、Math.floor(Math.random()*8)D、Math.ceil(Math.random()*8)

考题 单选题研究下面的Java代码:  switch (x) {  case 1:  System.out.println(1);  case 2:  case 3:  System.out.println(3);  case 4:  System.out.println(4); }  当x=2时,运行结果是()。A 没有输出任何结果B 输出结果为3C 输出结果是3和4D 输出结果是1、3和4

考题 单选题System.out.println(4|3)能打印出什么结果()A 6B 0C 1D 7

考题 填空题能打印出一个双引号的语句是System.out.println("____");。

考题 单选题以下程序的打印结果是什么() tx=session.beginTransaction(); Customer c1=(Customer)session.load(Customer.class,new Long(1)); Customer c2=(Customer)session.load(Customer.class,new Long(1)); System.out.println(c1==c2); tx.commit(); session.close();A 运行出错,抛出异常B 打印falseC 打印trueD 编译出错