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?()

  • 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.

相关考题:

1. public class ReturnIt {  2. return Type methodA(byte x, double y) {  3. return (long)x / y * 2;  4. }  5. }  What is the narrowest valid returnType for methodA in line2?()  A、 intB、 byteC、 longD、 shortE、 floatF、 double

Java中所有类的父类是()。A、FatherB、DangC、ExceptionD、Object

public class X {  public static void main (String[]args)  {  String s1 = new String (“true”);  Boolean b1 = new Boolean (true);  if (s2.equals(b1))   {  System.out.printIn(“Equal”);  }  }  }      What is the result?()  A、 The program runs and prints nothing.B、 The program runs and prints “Equal”C、 An error at line 5 causes compilation to fail.D、 The program runs but aborts with an exception.

1. public class X {  2. public object m ()  {  3. object o = new float (3.14F);  4. object [] oa = new object [1]; 5. oa[0]= o;  6. o = null;  7. oa[0] = null;  10. return o;  9. }  10. }  When is the float object created in line 3, eligible for garbage collection?()  A、 Just after line 5.B、 Just after line 6.C、 Just after line 7.D、 Just after line 8(that is, as the method returns).

通过JDBC访问数据库包含下面哪几步()。A、载入JDBC驱动程序B、建立连接C、执行查询或更新D、关闭连接

在正方体上任取三个顶点连成三角形,则所得的三角形是直角非等腰三角形的概率为()。A、1/14B、4/7C、2/7D、3/7