Given:
int index = 1;
boolean[] test = new Boolean;
boolean foo= test [index];
What is the result?
int index = 1;
boolean[] test = new Boolean;
boolean foo= test [index];
What is the result?
举一反三
- test = new Boolean; boolean foo= test [index]; What is the result?
- 以下程序代码执行后,哪个说法正确?int index = 1;boolean[] test =new Boolean[3];boolean foo=test [index]; A: 无法编译 B: foo的值是true C: foo的值是false D: foo的值是0
- 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.
- int index = 1; int [] foo = new int [3]; 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.
- 请阅读下面的代码 boolean a = false; boolean b = true; boolean c= ( a&&b)&&(!b); int result = (c = = false)?1:2; 当语句执行完,变量c与result的值为