You need to store a Java long primitive attribute, called cu

题目
多选题
You need to store a Java long primitive attribute, called customerOID, into the session scope. Which two code snippets allow you to insert this value into the session?()
A

long customerOID = 47L;session.setAttribute(customerOID, new Long(customerOID));

B

long customerOID = 47L;session.setLongAttribute(customerOID, new Long(customerOID));

C

long customerOID = 47L;session.setAttribute(customerOID, customerOID);

D

long customerOID = 47L;session.setNumericAttribute(customerOID, new Long(customerOID));

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

第1题:

Your company has an existing Windows Communication Foundation (WCF) service that allows business partners to place orders. The service uses netMsmqBinding. You find that processing every order in its own transaction is causing a delay. You need to ensure that the service is configured to process multiple orders in one transaction. What should you do? ()

A. Useservice behavior and set the maxConcurrentCalls attribute.

B. Useendpoint behavior and set the maxBatchSize attribute.

C. Useendpoint behavior and set the maxPendingReceives attribute.

D. Useendpoint behavior.


参考答案:B

第2题:

The public store is to close at 9:30 p.m. ()no need to worry; it is just 7:30 p.m.

  • A、You have 
  • B、They have 
  • C、It is 
  • D、There is

正确答案:D

第3题:

—I can't see the words on the blackboard. —Perhaps you need _( )

A. How long ago did you get it this

B. How long have you been like this

C. How soon have you got it

D. How soon have you liked this


正确答案:B 

第4题:

You need to store a floating point number,called Tsquare,in the session scope. Which two code snippetsallow you to retrieve this value?()

  • A、float Tsquare = session.getFloatAttribute("Tsquare");
  • B、float Tsquare = (Float) session.getAttribute("Tsquare");
  • C、float Tsquare = (float) session.getNumericAttribute("Tsquare");
  • D、float Tsquare = ((Float) session.getAttribute.("Tsquare")).floatValue();
  • E、float Tsquare = ((Float) session.getFloatAttribute.("Tsquare")).floatValue;

正确答案:B,D

第5题:

You need to store elements in a collection that guarantees that no duplicates are stored. Which two interfaces provide that capability?()

  • A、 Java.util.Map
  • B、 Java.util.Set
  • C、 Java.util.List
  • D、 Java.util.StoredSet
  • E、 Java.util.StoredMap
  • F、 Java.util.Collection

正确答案:B,D

第6题:

You need to store a Java long primitive attribute, called customerOID, into the session scope. Which two code snippets allow you to insert this value into the session?()

  • A、long customerOID = 47L;session.setAttribute("customerOID", new Long(customerOID));
  • B、long customerOID = 47L;session.setLongAttribute("customerOID", new Long(customerOID));
  • C、long customerOID = 47L;session.setAttribute("customerOID", customerOID);
  • D、long customerOID = 47L;session.setNumericAttribute("customerOID", new Long(customerOID));

正确答案:A,C

第7题:

Your web application uses a simple architecture in which servlets handle requests and then forward to aJSP using a request dispatcher. You need to pass information calculated by the servlet to the JSP;furthermore, that JSP uses a custom tag and must also process this information. This information mustNOT be accessible to any other servlet, JSP or session in the webapp. How can you accomplish this goal?()

  • A、Store the data in a public instance variable in the servlet.
  • B、Add an attribute to the request object before using the request dispatcher.
  • C、Add an attribute to the context object before using the request dispatcher.
  • D、This CANNOT be done as the tag handler has no means to extract this data.

正确答案:B

第8题:

You develop a serializable class for persisting objects as files.Every time an object is serialized, you have to update the database with the name of the object and location of that file.You elect to employ the OnSerialized attribute to achieve this objective.You now need to apply the OnSerialized attribute to a certain method.What should you do?()

A.

B.

C.

D.


参考答案:C

第9题:

You need to store elements in a collection that guarantees that no duplicates are stored and all elements can be accessed in natural order. Which interface provides that capability?()  

  • A、Java.util.Map.
  • B、Java.util.Set.
  • C、Java.util.List.
  • D、Java.util.StoredSet.
  • E、Java.util.StoredMap.
  • F、Java.util.Collection.

正确答案:D

第10题:

请选择合适的选项,补充下列英文句子: Thank you for your() to my store, you can find the products you need from my store.

  • A、visitted
  • B、visited
  • C、visits
  • D、visiting

正确答案:D

更多相关问题