JavaScript and J2EE Web Technologies

Test your knowledge of web technologies including JavaScript fundamentals, J2EE/Servlet concepts, multitier application architecture, and enterprise Java development patterns.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

When do you use a session bean?

  1. When you want to be certain your application data persists between program invocations, even in the event of a crash.
  2. If you need to initiate a database transaction.
  3. To process transient data that can be re-created in the event of a crash.
  4. To keep people who do not know how to program from accidentally changing important logic code.
Question 2 Multiple Choice (Single Answer)

Why would you design a J2EE application so user data is entered by way of a JavaServer Page and managed by an underlying JavaBeans class?

  1. To make the user interface more interesting.
  2. To simplify application deployment.
  3. To prevent malicious programs from gaining access to sensitive information on your database server.
  4. To make the application much easier to update, maintain, and manage.
Question 3 Multiple Choice (Single Answer)

Why is XML a good way to transfer text-based data from one program or tool to another?

  1. XML imposes important limitations on the receiving program or tool.
  2. The receiving program or tool can use the XML tagging information to determine how to best handle the incoming data.
  3. XML tags offer an extra level of security.
  4. XML tags specify to the receiving program or tool exactly how to format and display the data.
Question 4 Multiple Choice (Single Answer)

What part of the J2EE platform handles data storage and retrieval on behalf of a container-managed entity bean?

  1. The thin client.
  2. Deployment descriptors.
  3. The JAR file.
  4. The bean's container
Question 5 Multiple Choice (Single Answer)

What is bean-managed persistence?

  1. When you implement entity or session bean methods to use SQL commands you provide.
  2. When the bean's container handles data storage and retrieval.
  3. When the J2EE server is never shut down.
  4. When changes to database data are lost during a crash.
Question 6 Multiple Choice (Single Answer)

How are life cycle methods called?

  1. By thin clients.
  2. By calls to the database.
  3. By the J2EE server.
  4. By the bean's container.
Question 7 Multiple Choice (Single Answer)

In a multitiered application, which tier is the browser in?

  1. First tier.
  2. Second tier.
  3. Third tier.
  4. Fourth tier.
Question 8 Multiple Choice (Single Answer)

what value will the following expressions evaluate in the JavaScript console? "6" + "5" * 2

  1. 16
  2. 130
  3. 610
  4. 22
Question 9 Multiple Choice (Single Answer)

To what value will the following expressions evaluate in the JavaScript console? null == undefined

  1. false
  2. true
  3. none of the above
  4. All of the above
Question 10 Multiple Choice (Single Answer)

To what value will the following expressions evaluate in the JavaScript console? typeof typeof null

  1. NaN
  2. null
  3. string
  4. None of the above
Question 11 Multiple Choice (Single Answer)

To what value will the following expressions evaluate in the JavaScript console?5 + true

  1. 6
  2. 5
  3. true
  4. NaN
Question 12 Multiple Choice (Single Answer)

To what value will the following expressions evaluate in the JavaScript console? a = 4; b = 6; a+++b;

  1. 11
  2. 10
  3. 12
  4. None of the above
Question 13 Multiple Choice (Single Answer)

To what value will the following expressions evaluate in the JavaScript console? 011 * 2

  1. 022
  2. 18
  3. 9
  4. None of the above
Question 14 Multiple Choice (Single Answer)

To what value will the following expressions evaluate in the JavaScript console? "abc"[2]

  1. b
  2. a
  3. c
  4. None of the above
Question 15 Multiple Choice (Single Answer)

To what value will the following expressions evaluate in the JavaScript console? (16).toString(16)

  1. o
  2. NaN
  3. null
  4. 10
Question 16 Multiple Choice (Single Answer)

To what value will the following expressions evaluate in the JavaScript console? "\u0061"

  1. a
  2. \u0061
  3. 0061
  4. "0061"
Question 17 True/False

To what value will the following expressions evaluate in the JavaScript console? NaN == NaN

  1. True
  2. False
Question 18 Multiple Choice (Single Answer)

To what value will the following expressions evaluate in the JavaScript console? typeof 1/0

  1. Infinity
  2. NaN
  3. number
  4. null
Question 19 Multiple Choice (Single Answer)

Can we override init(),service(),destroy()

  1. no
  2. yes but except service()
  3. yes except init()
  4. yes except destroy()
Question 20 True/False

Is servlet is an abstract class

  1. True
  2. False