What will be written to the standard output when the followi

题目
单选题
What will be written to the standard output when the following program is run?()   public class Q8499 {   public static void main(String args[]) {  double d = -2.9;   int i = (int) d;  i *= (int) Math.ceil(d);  i *= (int) Math.abs(d);   System.out.println(i);   }   }
A

12

B

18

C

8

D

9

E

27

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

According to the article, Piano Man and Street-life Serenade were ______.

A. written when Billy Joel was fourteen

B. released by Columb a Records

C. hit albums

D. written as movies soundtracks


正确答案:C

Two years laterafter the release of the smash-hit albums Piano Man and Street-life SerenadeBilly was namedBest New Male Vocalistby Cask Box magazine.”两年之后,也就是在他发行了风行一时的两本歌集之后,他被一家杂志社评为“最佳新男歌手”。


第2题:

标准额定输出功率(standard rated output)


正确答案:燃气轮机在透平温度、 转速、 燃料、进气温度、 进气压力和相对湿度、 排气压力为标准参考条件下, 且处于新的和清洁的状态下运行时的标称或保证的输出功率。

第3题:

What happens when you try to compile and run the following program?

class Mystery{String s;public static void main(String[] args){

Mystery m=new Mystery();m.go();}void Mystery(){s=”constructor”;}void go(){System.out.println(s);}

}()

A.this code will not compile

B.this code compliles but throws an exception at runtime

C.this code runs and “constructor” in the standard output

D.this code runs and writes “null” in the standard output


参考答案:D

第4题:

What will be written to the standard output when the following program is run?()  public class Qd803 {   public static void main(String args[]) {   String word = "restructure";   System.out.println(word.substring(2, 3));   }   }  

  • A、est
  • B、es
  • C、str
  • D、st
  • E、s

正确答案:E

第5题:

What will be written to the standard output when the following program is run?()   public class Q63e3 {   public static void main(String args[]) {   System.out.println(9 ^ 2);   }   }  

  • A、81
  • B、7
  • C、11
  • D、0
  • E、false

正确答案:C

第6题:

The standard ______ in C language contain many useful functions for input and output, string handling, mathematical computations, and system programming tasks.

A.database

B.files

C.libraries

D.subroutine


正确答案:C
解析:译文的含义是:在C语言中,标准()函数包括许多用于输入、输出、字符串处理、数学计算、系统调用的函数。在C语言中,包含这些函数的是标准库函数,故本题应该选择C。

第7题:

What will be the result of attempting to run the following program?()   public class Qaa75 {   public static void main(String args[]) {   String[][][] arr = {   { {}, null },   { { "1", "2" }, { "1", null, "3" } },   {},   { { "1", null } }  };   System.out.println(arr.length + arr[1][2].length);   }   }  

  • A、The program will terminate with an ArrayIndexOutOfBoundsException.
  • B、The program will terminate with a NullPointerException.
  • C、4 will be written to standard output.
  • D、6 will be written to standard output.
  • E、7 will be written to standard output.

正确答案:A

第8题:

当警察实施临时交通管制时,保安的任务是什么?

A.What jobs will the securities do when the police close the traffic temporarily?

B.What career will the securities select when police leave the scene?

C.What roles will the securities play when the police investigate the scene?

D.What specific tasks will the securities shoulder when the police make a written statement?


正确答案:A

第9题:

What will be the result of attempting to compile and run the following code?()   public class Q6b0c {   public static void main(String args[]) {  int i = 4;  float f = 4.3;   double d = 1.8;   int c = 0;   if (i == f) c++;   if (((int) (f + d)) == ((int) f + (int) d))  c += 2;   System.out.println(c);   }   }  

  • A、The code will fail to compile.
  • B、0 will be written to the standard output.
  • C、1 will be written to the standard output.
  • D、2 will be written to the standard output.
  • E、3 will be written to the standard output.

正确答案:A

第10题:

健康计划的总体目标中的三个"W"指()

  • A、who,what,when
  • B、what,when,why
  • C、who,what,which
  • D、what,when,where
  • E、when,where,which

正确答案:A

更多相关问题