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.
Questions
When do you use a session bean?
- When you want to be certain your application data persists between program invocations, even in the event of a crash.
- If you need to initiate a database transaction.
- To process transient data that can be re-created in the event of a crash.
- To keep people who do not know how to program from accidentally changing important logic code.
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?
- To make the user interface more interesting.
- To simplify application deployment.
- To prevent malicious programs from gaining access to sensitive information on your database server.
- To make the application much easier to update, maintain, and manage.
Why is XML a good way to transfer text-based data from one program or tool to another?
- XML imposes important limitations on the receiving program or tool.
- The receiving program or tool can use the XML tagging information to determine how to best handle the incoming data.
- XML tags offer an extra level of security.
- XML tags specify to the receiving program or tool exactly how to format and display the data.
What part of the J2EE platform handles data storage and retrieval on behalf of a container-managed entity bean?
- The thin client.
- Deployment descriptors.
- The JAR file.
- The bean's container
What is bean-managed persistence?
- When you implement entity or session bean methods to use SQL commands you provide.
- When the bean's container handles data storage and retrieval.
- When the J2EE server is never shut down.
- When changes to database data are lost during a crash.
How are life cycle methods called?
- By thin clients.
- By calls to the database.
- By the J2EE server.
- By the bean's container.
In a multitiered application, which tier is the browser in?
- First tier.
- Second tier.
- Third tier.
- Fourth tier.
what value will the following expressions evaluate in the JavaScript console? "6" + "5" * 2
- 16
- 130
- 610
- 22
To what value will the following expressions evaluate in the JavaScript console? null == undefined
- false
- true
- none of the above
- All of the above
To what value will the following expressions evaluate in the JavaScript console? typeof typeof null
- NaN
- null
- string
- None of the above
To what value will the following expressions evaluate in the JavaScript console?5 + true
- 6
- 5
- true
- NaN
To what value will the following expressions evaluate in the JavaScript console? a = 4; b = 6; a+++b;
- 11
- 10
- 12
- None of the above
To what value will the following expressions evaluate in the JavaScript console? 011 * 2
- 022
- 18
- 9
- None of the above
To what value will the following expressions evaluate in the JavaScript console? "abc"[2]
- b
- a
- c
- None of the above
To what value will the following expressions evaluate in the JavaScript console? (16).toString(16)
- o
- NaN
- null
- 10
To what value will the following expressions evaluate in the JavaScript console? "\u0061"
- a
- \u0061
- 0061
- "0061"
To what value will the following expressions evaluate in the JavaScript console? NaN == NaN
- True
- False
To what value will the following expressions evaluate in the JavaScript console? typeof 1/0
- Infinity
- NaN
- number
- null
Can we override init(),service(),destroy()
- no
- yes but except service()
- yes except init()
- yes except destroy()
Is servlet is an abstract class
- True
- False