Which of the following classes is an engine class designed to provide conversions between opaque cryptographic keys and allows you to build an opaque key object from a given key specification?
You work as a Software Developer for TechnoZen Inc. You create an application using Java. You define a method, named myMethod. You also define a class, named myClass, within myMethod.
Which of the following rules governs the access to the variables of the enclosing method?
Mark works as a Programmer for InfoTech Inc. He develops an application named AccountServlet. He wants to ensure that no body can access his application, i.e., he does not want any role to have access on his application. He defines the following security constraint for his application.
<security-constraint>
<web-resource-collection>
<web-resource-name>AccountServlet</web-resource-name>
<http-method>GET</http-method>
<http-method>PUT</http-method>
</web-resource-collection>
//code
</security-constraint>
Which of the following options will be used to secure his application?
Which of the following code snippets will read the eighth byte of the file wRead.txt into the variable str?
You work as a developer for PassGuide Inc. You have implemented a session bean with a method doPrint(), which behaves differently depending on the caller's security role. Only MANAGER in the security roles "ADMIN" and "MANAGER" are allowed to call the method. Which of the following actions are appropriate to accomplish if there is no security-related metadata in the deployment descriptor?
Each correct answer represents a complete solution. Choose all that apply.
You work as a programmer for PassGuide.Inc. You want to create a servlet filter that stores all request headers to a database for all requests to the Web application's home page "/work.jsp". Which of the following HttpServletRequest methods allows you to retrieve all of the request headers?
You work as a Software Developer for UcNet Inc. You write the following code using Java.
class StringTest
{
public static void main(String args[])
{
String s = "Hi";
s.concat("There");
System.out.println(s);
}
}
What will happen when you try to compile and execute the code?
Roger works as a Software Developer for Tech Mart Inc. He creates an application using Enterprise JavaBeans. In the bean class, he writes a code snippet as follows.
Boolean b = ctx.isCallerInRole("Administrator");
The Application Assembler named Bob declares the following entries within the <entity> element of the deployment descriptor.
1. <security-role-ref>
2. The HR-Manager will have permission to access all the methods.
3. <role-name>HR-Manager
4.
5. </security-role-ref>
Bob wants to ensure that the HR-Manager declared in the deployment descriptor has all the privileges of an administrator. Which of the following elements should Bob declare in line 4 while deploying the bean?
There are two threads defined in an application named "thread1" and "thread2". Which of the following options can be the direct cause of "thread1" becoming blocked?
Each correct answer represents a complete solution. Choose all that apply.
Mary works as a Software Developer for ABC Solutions Inc. She writes the following code.
public class StringMethods {
public static void main(String[] args) {
String str = new String("abc");
str.concat("xyz");
StringBuffer strBuf = new StringBuffer(" 123");
strBuf.append(" no");
System.out.println(str + strBuf);}}
What will be the output when Mary tries to compile and execute the code?
PDF + Testing Engine
|
---|
$66 |
Testing Engine
|
---|
$50 |
PDF (Q&A)
|
---|
$42 |
GIAC Free Exams |
---|
![]() |