Which of the following elements are the subelements of the mime-mapping element in a
deployment descriptor file? Each correct answer represents a complete solution. Choose all that
apply.
C,D
John works as a Software Developer for VenTech Inc. He writes the following code using Java.
public class vClass extends Thread
{
public static void main(String args[])
{
vClass vc=new vClass();
vc.run();
}
public void start()
{
for(int k=0;k<20;k++)
{
System.out.println("The value of k = "+k);
}
}
}
What will happen when he attempts to compile and execute the application?
D
Which of the following classes is an engine class that provides an opaque representation of
cryptographic parameters?
D
Which of the following statements about programmatic security are true? Each correct answer
represents a complete solution. Choose all that apply.
A,B,C
Which of the following functions are performed by methods of the HttpSessionActivationListener
interface? Each correct answer represents a complete solution. Choose all that apply.
B,D
Mark works as a Programmer for InfoTech Inc. He develops the following deployment descriptor
code.
<web-app . . . .>
<display-name>A Secure Application</display-name><servlet>
...
<security-role-ref >
<role-name>Manager</role-name>
<role-link>Admin</role-link>
</security-role-ref>
</servlet>
<security-role>
<role-name>Programmer</role-name>
</security-role>
<security-role>
<role-name>Admin</role-name>
</security-role>
<security-role>
<role-name>Employee</role-name>
</security-role>
</web-app>
Which of the following is a valid isUserInRole() method call that can be made if request is the
HttpServletRequest request?
B
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.
A,D
Mark works as a Programmer for InfoTech Inc. He develops a deployment descriptor code that
contains three valid <security-constraint> elements. All of them constraining a Web resource Res1,
the <auth-constraint> sub-element of the <security-constraint> 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?
B
Which of the following statements correctly describe the features of the singleton pattern? Each
correct answer represents a complete solution. Choose all that apply.
A,C,D
Which of the following deployment descriptor elements must contain the <transport-guarantee>
element as its mandatory sub-element?
A
Given a code of a class named PrintString that prints a string.
1. public class PrintString{
2. public static void main(String args[]){
3. /*insert code here */
4. /* insert code here */
5. System.out.println(str);
6. }
7. }
Which of the following code fragments can be inserted in the class PrintString to print the output
"4247"?
Each correct answer represents a complete solution. Choose all that apply.
A,B
Mark writes a class Practice.java. This class needs to access the com.bar.Test class that is stored in the
Test.jar file in the directory /practice. How would you compile your code?
A
Which of the following statements is true?
E
John works as a Programmer for Technostar Inc. He writes the following code using Java.
1. class WrapperClass{
2. public static void main(String[] argv){
3. String str2 = Double.toString(12);
4. String str1 = Double.toHexString(12);
5. System.out.println(str1+str2);
6. }
7. }
What will happen when John attempts to compile and execute the code?
C
Mark works as a Programmer for InfoTech Inc. He develops a Website that uses HTML and processes
HTML validation. Which of the following are the advantages of the HTML application?
Each correct answer represents a complete solution. Choose all that apply.
B,C,D,F