Pass the GIAC GIAC Certification GSSP-Java Questions and answers with CertsForce

Viewing page 1 out of 9 pages
Viewing questions 1-10 out of questions
Questions # 1:

Mark works as a Programmer for InfoTech Inc. He creates an error page named

PageDoesNotExist.jsp. He wants to ensure that the PageDoesNotExist.jsp page will always be displayed if the server cannot find the requested page or if the request is for a page that does not exist on the server. Which of the following error-page code declarations will be used?

Options:

A.

406

PageDoesNotExist.jsp


B.

405

PageDoesNotExist.jsp


C.

404

PageDoesNotExist.jsp


D.

503

PageDoesNotExist.jsp


Questions # 2:

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.

Options:

A.

final static int answer=42;


B.

public static int answer = 42;


C.

private final static int answer=42;


D.

public int answer=42;


E.

int answer;


Questions # 3:

Which of the following statements are true about the doAs() and doAsPrivileged() methods?

Each correct answer represents a complete solution. Choose all that apply.

Options:

A.

The doAsPrivileged() method invokes AccessController.doPrivileged by passing it the provided PrivilegedAction.


B.

The doAs() and doAsPrivileged() methods perform privileged work as a particular Subject.


C.

The doAs() method retrieves the current Thread's AccessControlContext via

AccessController.getContext.


D.

The doAsPrivileged() method, instead of retrieving the current Thread's AccessControlContext, uses the provided AccessControlContext.


Questions # 4:

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.

AccountServlet

/acme/Account

GET

PUT

//code

Which of the following options will be used to secure his application?

Options:

A.

<auth-constraint/>


B.

Skip the <auth-constraint> element in the security constraint code.


C.

<auth-constraint>

*

</auth-constraint>


D.

<auth-constraint>

NONE

</auth-constraint>


Questions # 5:

Which of the following code snippets will read the eighth byte of the file wRead.txt into the variable str?

Options:

A.

RandomAccessFile raf=new RandomAccessFile("wRead.txt");

raf.seek(8);int str=raf.readByte();


B.

FileInputStream fis=new FileInputStream("wRead.txt");

int str=fis.read(8);


C.

FileInputStream fis=new FileInputStream("wRead.txt");

fis.skip(8);int str=fis.read();


D.

FileInputStream fis=new FileInputStream("wRead.txt");

fis.skip(7);int str=fis.read();


Questions # 6:

Which of the following statements make a message-driven bean different from a session bean?

Each correct answer represents a complete solution. Choose all that apply.

Options:

A.

Multiple clients can be processed by a single message-driven bean.


B.

A message-driven bean has only one bean class.


C.

Clients do not access message-driven beans through interfaces.


D.

The EJB container can assign a message to any message-driven bean instance because all instances of a message-driven bean are equivalent.


E.

Data or conversational state for a specific client cannot be retained by message-driven bean instances.


Questions # 7:

What will happen when you try to compile and execute the following code?

class strconcat {public static void main(String args[])

{String str =" Correct answers";String perc ="a"+"b";System.out.println(80+ '%' + str);}}

Note. The ASCII value of % is 37.

Options:

A.

It will compile and execute successfully and will print 80 Correct answers as the output.


B.

It will compile and execute successfully and will print 117 Correct answers as the output.


C.

It will compile and execute successfully and will print 80% Correct answers as the output.


D.

It will fail to compile because % cannot be concatenated to a string.


Questions # 8:

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?

Options:

A.

KeyPair


B.

KeyFactory


C.

CertificateFactory


D.

KeyPairGenerator


Questions # 9:

You work as a Software Developer for UcTech Inc. You are building a Web site that will contain study materials on the Java language. The company wants that members can access all the pages, but nonmembers have only limited access to the Web site pages. Which of the following security mechanisms will you use to accomplish the task?

Options:

A.

Authentication


B.

Data integrity


C.

Confidentiality


D.

Authorization


Questions # 10:

Mark works as a Programmer for InfoTech Inc. He creates a method named roomBooking() and this method throws IndexOutOfBoundsException. Which of the following roles will automatically handle the exception?

Options:

A.

Bean Provider


B.

Application Assembler


C.

Bean Deployer


D.

Container


Viewing page 1 out of 9 pages
Viewing questions 1-10 out of questions