int index = 1;   boolean test = new Boolean;   boolean foo= test [index];  What is the result?()A、 Foo has the value of 0.B、 Foo has the value of null.C、 Foo has the value of true.D、 Foo has the value of false.E、 An exception is thrown.F、 The code will no

题目

int index = 1;   boolean test = new Boolean;   boolean foo= test [index];  What is the result?()

  • A、 Foo has the value of 0.
  • B、 Foo has the value of null.
  • C、 Foo has the value of true.
  • D、 Foo has the value of false.
  • E、 An exception is thrown.
  • F、 The code will not compile.
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

int index = 1;   String test = new String;   String foo = test[index];  What is the result?()

  • A、  Foo has the value “”
  • B、 Foo has the value null
  • C、 An exception is thrown
  • D、 The code will not compile

正确答案:B

第2题:

Which statements concerning the relationships between the following classes are true?()   class Foo {  int num;   Baz comp = new Baz();   }   class Bar {  boolean flag;   }   class Baz extends Foo {   Bar thing = new Bar();   double limit;   }  

  • A、A Bar is a Baz.
  • B、A Foo has a Bar.
  • C、A Baz is a Foo.
  • D、A Foo is a Baz.
  • E、A Baz has a Bar.

正确答案:C,E

第3题:

有如下类定义:

class Foo

{

public:

Foo(int v):value(v){} // ①

~Foo(){} // ②

private:

Foo(){} // ③

int value = 0; // ④

};

其中存在语法错误的行是

A . ①

B . ②

C . ③

D . ④


正确答案:D

第4题:

int index = 1;   int foo = new int ;   int bar = foo [index];   int baz = bar + index;   What is the result?()

  • A、 Baz has the value of 0
  • B、 Baz has the value of 1
  • C、 Baz has the value of 2
  • D、 An exception is thrown.
  • E、 The code will not compile.

正确答案:B

第5题:

String foo = “blue”;  Boolean[]bar = new Boolean [1];  if (bar[0])  {  foo = “green”;  }   What is the result? () 

  • A、 Foo has the value of “”
  • B、 Foo has the value of null.
  • C、 Foo has the value of “blue”
  • D、 Foo has the value of “green”
  • E、 An exception is thrown.
  • F、 The code will not compile.

正确答案:F

第6题:

Which code determines the int value foo closest to a double value bar?()  

  • A、 Int foo = (int) Math.max(bar);
  • B、 Int foo = (int) Math.min(bar);
  • C、 Int foo = (int) Math.abs(bar);
  • D、 Int foo = (int) Math.ceil(bar);
  • E、 Int foo = (int) Math.floor(bar);
  • F、 Int foo = (int) Math.round(bar);

正确答案:F

第7题:

Given:  8.int index = 1:  9.Boolean [] test = new boolcan [3];  10.boolcan foo = test [index];   What is the result()?  

  • A、 foo has the value of 0.
  • B、 foo has the value of null.
  • C、 foo has the value of true.
  • D、 foo has the value of false.
  • E、 An-exception is thrown.
  • F、 The code will not compile.

正确答案:D

第8题:

public class test(  public static void main(string[]args){  string foo = args [1];  string foo = args [2];  string foo = args [3];  }  )  And command line invocation: Java Test red green blue   What is the result?()  

  • A、 Baz has the value of “”
  • B、 Baz has the value of null
  • C、 Baz has the value of “red”
  • D、 Baz has the value of “blue”
  • E、 Bax has the value of “green”
  • F、 The program throws an exception.

正确答案:F

第9题:

String foo = “blue”;    Booleanbar = new Boolean [1];    if (bar[0]) {    foo = “green”;    }   What is the result?()  

  • A、 Foo has the value of “”
  • B、 Foo has the value of null.
  • C、 Foo has the value of “blue”
  • D、 Foo has the value of “green”
  • E、 An exception is thrown.
  • F、 The code will not compile.

正确答案:F

第10题:

public class test(   public static void main(stringargs){   string foo = args [1];   string foo = args ;   string foo = args ;   }   )   And command line invocation:  Java Test red green blue  What is the result? () 

  • A、 Baz has the value of “”
  • B、 Baz has the value of null
  • C、 Baz has the value of “red”
  • D、 Baz has the value of “blue”
  • E、 Bax has the value of “green”
  • F、 The program throws an exception.

正确答案:F

更多相关问题