多选题Assume session is an HttpSession, and is not referenced anywhere else in ServletA. Which two changes, taken together, ensure that value is equal to “Hello” on line 23? ()AABBCCDDEE

题目
多选题
Assume session is an HttpSession, and is not referenced anywhere else in ServletA. Which two changes, taken together, ensure that value is equal to “Hello” on line 23? ()
A

A

B

B

C

C

D

D

E

E

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

Given an HttpServletRequest request and an HttpServletResponse response: 41.HttpSession session = null; 42.// insert code here 43.if(session == null) { 44.// do something if session does not exist 45.} else { 46.// do something if session exists47. } To implement the design intent,which statement must be inserted at line 42?()

  • A、session = response.getSession();
  • B、session = request.getSession();
  • C、session = request.getSession(true);
  • D、session = request.getSession(false);
  • E、session = request.getSession("jsessionid");

正确答案:D

第2题:

Which of the following is a characteristic of a sequence?()

  • A、A sequence will never generate duplicate values
  • B、The MAXVALUE of a sequence can be equal to the MINVALUE
  • C、It is not possible to create a sequence that generates a constant since the INCREMENT value must be greater than zero
  • D、When a sequence cycles back to either the MAXVALUE or MINVALUE, it will always be equal to the specified value of either of these two boundaries

正确答案:B

第3题:

Given:Which two changes, taken together, would guarantee the output: 1, 2, 3, 4, 5, ?()

A.move the line 12 print statement into the foo() method

B.change line 7 to public synchronized void go() {

C.change the variable declaration on line 2 to private volatile int x;

D.wrap the code inside the foo() method with a synchronized( this ) block

E.wrap the for loop code inside the go() method with a synchronized block synchronized(this){ //for loop code here }


参考答案:A, D

第4题:

Which HttpSession method stores an object in a session?()

  • A、 put(String name. Object value)
  • B、 set(String name. Object value)
  • C、 setAttribute(String name. Object value)
  • D、 putAttribute(String name. Object value)
  • E、 addAttribute(String name. Object value)

正确答案:C

第5题:

Which two statements about MPLS Label Distribution Protocol (LDP) are true? ()

  • A、LDP hello packets are sent to TCP 646.
  • B、LDP session packets are sent to TCP 646.
  • C、LDP session packets are sent to TCP 711.
  • D、LDP hello packets are sent to TCP 711.
  • E、LDP hello packets are sent to UDP 711.
  • F、LDP hello packets are sent to UDP 646.

正确答案:B,F

第6题:

You want to create a temporary table named OLD_INVENTORY in the OLD_INVENTORY database on the master server. This table is not to be replicated to the slave server. Which two changes would ensure that the temporary table does not propagate to the slave?()

  • A、Use the – replicate-do-db, — replicate-do-table, or – replicate-wild-do-table option with the value equal to OLD_INVENTORY
  • B、Change the binlog_format option to ROW and restart mysqld before you create the OLD_INVENTORY table
  • C、Stop SQL_THREAD on the slave until you have finished using the OLD_INVENTORY temporary table
  • D、Set binlog_format=MIXED with the – replicate-ignore-temp-table option
  • E、Use the – replicate-ignore-table option with the value equal to OLD_INENTORY.OLD_INVENTORY and restart mysqld before creating the temporary table

正确答案:B,E

第7题:

Given an HttpServletRequest request: 22.String id = request.getParameter("jsessionid"); 23.// insert code here 24.String name = (String) session.getAttribute("name"); Which three can be placed at line 23 to retrieve anexisting HttpSession object?()

  • A、HttpSession session = request.getSession();
  • B、HttpSession session = request.getSession(id);
  • C、HttpSession session = request.getSession(true);
  • D、HttpSession session = request.getSession(false);
  • E、HttpSession session = request.getSession("jsessionid");

正确答案:A,C,D

第8题:

Which of the following is a characteristic of a sequence?()

A.A sequence will never generate duplicate values

B.The MAXVALUE of a sequence can be equal to the MINVALUE

C.It is not possible to create a sequence that generates a constant since the INCREMENT value must be greater than zero

D.When a sequence cycles back to either the MAXVALUE or MINVALUE, it will always be equal to the specified value of either of these two boundaries


参考答案:B

第9题:

Given that a scoped attribute cart exist only in a user’s session, which two, taken independently, ensure the scoped attribute cart no longer exists?()

  • A、 ${cart = null } 
  • B、 <c:remove var=”cart” /> 
  • C、 <c:remove var=”${cart}” /> 
  • D、 <c:remove var=”cart” scope=”session” /> 
  • E、 <c:remove scope=”session”>cart</c:remove>
  • F、 <c:remove var=”${cart}” scope=”session” /> 
  • G、 <c:remove scope=”session”>${cart}</c:remove>

正确答案:D,E

第10题:

Given that session is a valid HttpSession object:   Int max = session.getAttribute(“MyReallyLongName”);   Which is true?()  

  • A、 The value returned needs to be cast to an int.
  • B、 The getAttribute methos takes two arguments.
  • C、 Primitive CANNOT be stored in the HttpSession.
  • D、 The HttpSession attribute name must NOT exceed eight characters.

正确答案:C

更多相关问题