Which of the following statements about a filter are true?
Each correct answer represents a complete solution. Choose all that apply.
Peter works as a Software Developer for Neon Inc. He is developing an application in Java. He declares an interface. Which of the following field declarations are valid within the body of an interface?
Each correct answer represents a complete solution. Choose three.
Which of the following methods can be invoked by a message-driven bean?
Each correct answer represents a complete solution. Choose all that apply.
Which of the following code fragments will compile without error?
Each correct answer represents a complete solution. Choose all that apply.
Which of the following are correct if LoginContext enforces the requisite flag to each LoginModule in the configuration file?
Each correct answer represents a complete solution. Choose all that apply.
Which of the following are the advantages of JAR files over TAR files?
Each correct answer represents a complete solution. Choose all that apply.
Which of the following methods of the java.util.logging package logs a message, specifying source class and method, with associated Throwable information?
Which of the following methods is defined by ObjectOutputStream?
Mark works as a Programmer for InfoTech Inc. He develops a program that defines a class named Inventory that has an instance variable named NumOfItems. Which of the following properties will be applied by NumOfItems?
Each correct answer represents a complete solution. Choose all that apply.
Which of the following declarations are the valid declaration for the
Each correct answer represents a complete solution. Choose all that apply.
Mark works as a Programmer for InfoTech Inc. He develops the following deployment descriptor code for specifying the security roles for a Web application.
Which of the following are the valid <auth-constraint> element that will allow the users to access resources constrained by the security role declared given above?
Each correct answer represents a complete solution. Choose all that apply.
Mark works as a Programmer for InfoTech Inc. He develops an application named JavaServices. He wants to declare a security constraint that will restrict everything in the com/files directory so that security role of Admin can invoke any http methods on the resources. Which of the following element declarations will be used to accomplish the task?
You work as a Software Developer for UcTech Inc. You want to ensure that a class is informed whenever an attribute is added, removed, or replaced in a session. Which of the following is the event that you will use to accomplish the task?
Mark works as a Programmer for InfoTech Inc. He develops the following code for a Web application named JavaSecurity Application.
...
Which of the following will be the action of the container if the request is HttpServletRequest, and request.isUserInRole("Admin"); has been called in a servlet code?
You work as a Programmer for InfoTech Inc. You develop two html pages named authenticate.jsp and error.jsp, which are deployed directly at the root of the Web application named Authentication. Which of the following deployment descriptor code declarations will be used to ensure that the error.jsp page will be displayed automatically if the client is not authenticated?
Which of the following statements is true?
Which of the following are valid method signatures of the getInstance() method of the Policy class?
Each correct answer represents a complete solution. Choose all that apply.
The following JSP scriptlet is given.
<% response.setContentType("text/html; charset=ISO-8859-1"); %>
Which of the following directives is the equivalent directive for the scriptlet given above?
You have created a Java application that will retrieve and insert data into a database table. Which of the following objects will you use to pass the JDBC Driver to obtain a connection to the database server?
Sam works as a Software Developer for Gentech Inc. He writes the following code.
1. class TryFinallyTest {
2. public static void main(String[] args) {
3. try {
4. int i=15/0;
5. System.out.println("Testing Try");
6. }
7. catch(ArithmeticException ae) {
8. System.out.println("Arithmetic exception");
9. }
10. System.out.println("Correct");
11. finally {
12. System.out.println("Must execute");
13. }
14. }
15. }
What will happen when he attempts to compile and execute the code?
Mark works as a Programmer for InfoTech Inc. He develops a deployment descriptor code that contains three valid
All of them constraining a Web resource Res1, the
<auth-constraint> sub-element of the
elements are as follows.
<auth-constraint>Admin</auth-constraint>
<auth-constraint>Manager</auth-constraint>
<auth-constraint/>
Which of the following can access the resource Res1?
Which of the following statements about programmatic security are true?
Each correct answer represents a complete solution. Choose all that apply.
Which of the following methods of the EJBContext interface can be called by both the BMT and CMT beans?
Each correct answer represents a complete solution. Choose all that apply.
Mark works as a Programmer for InfoTech Inc. He develops a session bean class named
accountService. Which of the following rules must be conformed by the session bean class?
Each correct answer represents a complete solution. Choose all that apply.
Which of the following code is used to create an object of security manager?
Which of the following are marker interfaces?
Each correct answer represents a complete solution. Choose all that apply.
Which of the following rules must be followed while determining a class loader?
Each correct answer represents a complete solution. Choose all that apply.
The following JSP scriptlet is given.
<% response.setContentType("text/html; charset=ISO-8859-1"); %>
Which of the following directives is the equivalent directive for the scriptlet given above?
Maria works as a Software Developer for Bluetech Inc. She develops a class named Warden that needs to access a class named Hostel, which is deployed in a JAR named City.JAR. What will she do in order to enable the Warden class to have access to the Hostel class during compilation?
Which of the following JAR file options is used for creating an archive?
You work as a programmer for PassGuide.Inc. You have a session object named session1 with an attribute named Attribute1, and an HttpSessionBindingEvent object binding1 bound to session1.
Which of the following will be used to retrieve Attribute1?
Each correct answer represents a complete solution. Choose all that apply.
Identify whether the given statement is true or false.
"An object becomes eligible for garbage collection when it becomes unreachable by any code."
Which of the following exceptions will be thrown if a cipher is in decryption mode but the decrypted data is not bounded by the appropriate bytes?
The __________ interface accepts results from a SQL SELECT statement.
Which of the following methods reinitializes the logging properties?
Identify whether the given statement is true or false.
"JAR files can be used while compiling but not while executing other files."
Identify whether the given statement is true or false.
"There is no method to create a new thread other than extending the Thread class."
You have written the following code snippet.
1. public class Read {
2. protected int ReadText(int x) { return 0; }
3. }
4. class Text extends Read {
5. /*insert code here*/
6. }
Which of the following methods, inserted independently at line 5, will compile?
Each correct answer represents a complete solution. Choose all that apply.
Which of the following exceptions will be thrown if the commit() method fails?
Which of the following statements are true?
Each correct answer represents a complete solution. Choose all that apply.