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题:
int index = 1; boolean test = new Boolean; boolean foo= test [index]; What is the result?()
第2题:
String foo = “blue”; Boolean[]bar = new Boolean [1]; if (bar[0]) { foo = “green”; } What is the result? ()
第3题:
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?()
第4题:
int index = 1; int [] foo = new int [3]; int bar = foo [index]; int baz = bar + index; What is the result?()
第5题:
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? ()
第6题:
Given: 8.int index = 1: 9.Boolean [] test = new boolcan [3]; 10.boolcan foo = test [index]; What is the result()?
第7题:
int index = 1; int foo = new int ; int bar = foo [index]; int baz = bar + index; What is the result?()
第8题:
int index = 1; String test = new String; String foo = test[index]; What is the result?()
第9题:
Given the HttpServlet code: getServletContext().setAttribute(“foo”, “value”); What is the result?()
第10题:
int index = 1; String [] test = new String[3]; String foo = test[index]; What is the result?()