Foo has the value of 0.
Foo has the value of null.
Foo has the value of true.
Foo has the value of false.
An exception is thrown.
The code will not compile.
第1题:
A.foohasthevalueof0.
B.foohasthevalueofnull.
C.foohasthevalueoftrue.
D.foohasthevalueoffalse.
E.An-exceptionisthrown.
F.Thecodewillnotcompile.
第2题:
下列关于boolean类型的叙述中,正确的是( )。
A.可以将boolean类型的数值转换为int类型的数值
B.可以将boolean类型的数值转换为字符串
C.可以将boolean类型的数值转换为char类型的数值
D.不能将boolean类型的数值转换为其他基本数据类型
第3题:
下列关于boolean类型的叙述中,正确的是
A.可以将boolean类型的数值转换为int类型的数值
B.可以将boolean类型的数值转换为字符串
C.可以将boolean类型的数值转换为char类型的数值
D.不能将boolean类型的数值转换为其他基本数据类型
第4题:
int i,j; boolean booleanValue=(i==j)。
第5题:
执行下列程序段之后,变量b的值为______。 public class Test9 { public static void main(String[] args) { int i=12; int j=24; boolean b1=true; boolean b=(j%i== 0)&&(!b1) ||(j/i!=2); System.out.println(b); } }
A.true
B.假
C.1
D.0
第6题:
A.Foohasthevalueof0.
B.Foohasthevalueofnull.
C.Foohasthevalueoftrue.
D.Foohasthevalueoffalse.
E.Anexceptionisthrown.
F.Thecodewillnotcompile.
第7题:
当执行下面代码时,会输出( )。 Boolean b1 = new Boolean(true); Boolean b2 = new Boolean(true); if (b1 == b2) if (bi.equals(b2)) System. out.printin ("a"); else System. out. println ("b"); else if (bi.equals(b2)) System. out.println ("c"); else System. out.printIn("d");
A.a
B.b
C.c
D.d
第8题:
( 12 )下列布尔变量定义中,正确并且规范的是
A )BOOLEAN canceled = false;
B)boolean canceled = false;
C)boolean CANCELED = false;
D)boolean canceled = FALSE;
第9题:
int index = 1; String test = new String; String foo = test[index]; What is the result?()
第10题:
将有三个boolean值的数组初始化为true的是()