网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
多选题
Given: String value = getServletContext().getInitParameter("foo"); in an HttpServlet and a web applicationdeployment descriptor that contains: foo frodo Which two are true?()
A

The foo initialization parameter CANNOT be set programmatically.

B

Compilation fails because getInitParameter returns type Object.

C

The foo initialization parameter is NOT a servlet initialization parameter.

D

Compilation fails because ServletContext does NOT have a getInitParameter method.

E

The foo parameter must be defined within the  element of the deployment descriptor.


参考答案

参考解析
解析: 暂无解析
更多 “多选题Given: String value = getServletContext().getInitParameter("foo"); in an HttpServlet and a web applicationdeployment descriptor that contains: foo frodo Which two are true?()AThe foo initialization parameter CANNOT be set programmatically.BCompilation fails because getInitParameter returns type Object.CThe foo initialization parameter is NOT a servlet initialization parameter.DCompilation fails because ServletContext does NOT have a getInitParameter method.EThe foo parameter must be defined within the  element of the deployment descriptor.” 相关考题
考题 Given:Stringvalue=getServletContext().getInitParameter(foo);inanHttpServletandawebapplicationdeploymentdescriptorthatcontains:context-paramparam-namefoo/param-nameparam-valuefrodo/param-value/context-paramWhichtwoaretrue?()A.ThefooinitializationparameterCANNOTbesetprogrammatically.B.CompilationfailsbecausegetInitParameterreturnstypeObject.C.ThefooinitializationparameterisNOTaservletinitializationparameter.D.CompilationfailsbecauseServletContextdoesNOThaveagetInitParametermethod.E.Thefooparametermustbedefinedwithintheelementofthedeploymentdescriptor.

考题 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 nullC、 An exception is thrownD、 The code will not compile

考题 Given: 6.% int[] nums = {42, 420, 4200}; 7.request.setAttribute("foo", nums); % Which two successfully translate and result in a value of true?()A、${true or false}B、${requestScope[foo][0]  500}C、${requestScope[’foo’][1] = 420}D、${(requestScope[’foo’][0] lt 50)  (3 gt 2)}

考题 Given: String value = getServletContext().getInitParameter("foo"); in an HttpServlet and a web applicationdeployment descriptor that contains: foo frodo Which two are true?()A、The foo initialization parameter CANNOT be set programmatically.B、Compilation fails because getInitParameter returns type Object.C、The foo initialization parameter is NOT a servlet initialization parameter.D、Compilation fails because ServletContext does NOT have a getInitParameter method.E、The foo parameter must be defined within the  element of the deployment descriptor.

考题 Given an EL function foo, in namespace func, that requires a long as a parameter and returns a Map, which two are valid invocations of function foo?()A、 ${func(1)}B、 ${foo:func(4)}C、 ${func:foo(2)}D、 ${foo(5):func}E、 ${func:foo(“easy”)}F、 ${func:foo(“3”).name}

考题 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.

考题 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.

考题 Given the JSP code: % request.setAttribute("foo", "bar"); %and the Classic tag handler code: 5. public int doStartTag() throws JspException { 6. // insert code here 7. // return int 8. } Assume there are no other "foo" attributes in the web application. Which invocation on the pageContextobject,inserted at line 6,assigns "bar" to the variable x?()A、String x = (String) pageContext.getAttribute("foo")B、String x = (String) pageContext.getRequestScope("foo")C、It is NOT possible to access the pageContext object from within doStartTagD、String x = (String) pageContext.getRequest().getAttribute("foo")E、String x = (String) pageContext.getAttribute("foo", PageContext.ANY_SCOPE)

考题 3. string foo = “ABCDE”;  4. foo.substring(3);   5. foo.concat(“XYZ”);   6.   Type the value of foo at line 6.()

考题 Given the HttpServlet code:   getServletContext().setAttribute(“foo”, “value”); What is the result?()A、 The attribute foo is placed in the applicationB、 A ServletContextListener registered for that servlet is notifiedC、 A ServletAttributeListener registered for that servlet is notifiedD、 An HttpSessionAttributeListener registered for that servlet is notified

考题 int index = 1;  String [] test = new String[3];  String foo = test[index];     What is the result?()  A、 Foo has the value “”B、 Foo has the value nullC、 An exception is thrownD、 The code will not compile

考题 多选题Given: 6. Which two successfully translate and result in a value of true?()A${true or false}B${requestScope[foo][0]  500}C${requestScope[’foo’][1] = 420}D${(requestScope[’foo’][0] lt 50)  (3 gt 2)}

考题 多选题Given:   10. class One {   11. void foo() { }   12. }   13. class Two extends One {   14. //insert method here   15. }   Which three methods, inserted individually at line 14, will correctly complete class Two?()Apublic void foo() { /* more code here */ }Bprivate void foo() { /* more code here */ }Cprotected void foo() { /* more code here */ }Dint foo() { /* more code here */ }Evoid foo() { /* more code here */ }

考题 多选题Given: Which three methods, inserted individually at line 14, will correctly complete class Two?()Aint foo() { /* more code here */ }Bvoid foo() { /* more code here */ }Cpublic void foo() { /* more code here */ }Dprivate void foo() { /* more code here */ }Eprotected void foo() { /* more code here */ }

考题 单选题int index = 1;  String [] test = new String[3];  String foo = test[index];     What is the result?()A  Foo has the value “”B  Foo has the value nullC  An exception is thrownD  The code will not compile

考题 单选题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.

考题 多选题Given: String value = getServletContext().getInitParameter("foo"); in an HttpServlet and a web applicationdeployment descriptor that contains: foo frodo Which two are true?()AThe foo initialization parameter CANNOT be set programmatically.BCompilation fails because getInitParameter returns type Object.CThe foo initialization parameter is NOT a servlet initialization parameter.DCompilation fails because ServletContext does NOT have a getInitParameter method.EThe foo parameter must be defined within the  element of the deployment descriptor.

考题 单选题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.

考题 单选题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.

考题 多选题public class Foo {  private int val;  public foo(int v) (val = v;)  }  public static void main (String [] args)  {  Foo a = new Foo (10);  Foo b = new Foo (10);  Foo c = a;  int d = 10;  double e = 10.0;  }  Which three logical expression evaluate to true?()A(a ==c)B(d ==e)C(b ==d)D(a ==b)E(b ==c)F(d ==10.0)

考题 单选题Given the HttpServlet code:   getServletContext().setAttribute(“foo”, “value”); What is the result?()A  The attribute foo is placed in the applicationB  A ServletContextListener registered for that servlet is notifiedC  A ServletAttributeListener registered for that servlet is notifiedD  An HttpSessionAttributeListener registered for that servlet is notified

考题 单选题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 nullC  An exception is thrownD  The code will not compile

考题 多选题Given an EL function foo, in namespace func, that requires a long as a parameter and returns a Map,which two are valid invocations of function foo?()A${func(1)}B${foo:func(4)}C${func:foo(2)}D${foo(5):func}E${func:foo(easy)}F${func:foo(3).name}

考题 单选题Which retrieves the value associated with “foo” from within an HttpServlet?()A  String value = getServletConfig( ).getParameter(“foo”);B  String value = getServletContext( ).getAttribute(“foo”);C  Object value = getServletContext( ).getInitParameter(“foo”);D  String value = getServletContext( ).getInitParameter(“foo”)

考题 单选题Given an EL function foo, in namespace func, that requires a long as a parameter and returns a Map, which two are valid invocations of function foo?()A  ${func(1)}B  ${foo:func(4)}C  ${func:foo(2)}D  ${foo(5):func}E  ${func:foo(“easy”)}F  ${func:foo(“3”).name}

考题 多选题Given: 6. 7. 8. and a custom tag handler for foo which extends TagSupport. Which two are true about thetag handler referenced by foo?()AThe doStartTag method is called once.BThe doAfterBody method is NOT called.CThe EVAL_PAGE constant is a valid return value for the doEndTag method.DThe SKIP_PAGE constant is a valid return value for the doStartTag method.EThe EVAL_BODY_BUFFERED constant is a valid return value for the doStartTag method.

考题 多选题Given: 6. 7. 8. and a custom tag handler for foo which extends TagSupport. Which two are true about thetag handler referenced by foo?()AThe doStartTag method is called once.BThe doAfterBody method is NOT called.CThe EVAL_PAGE constant is a valid return value for the doEndTag method.DThe SKIP_PAGE constant is a valid return value for the doStartTag method.EThe EVAL_BODY_BUFFERED constant is a valid return value for the doStartTag method.