Summer Special 60% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: bestdeal

Free GIAC GSSP-Java Practice Exam with Questions & Answers | Set: 2

Questions 11

Which of the following exceptions will a compiler throw when a number is divided by zero?

Options:
A.

ArithmeticException

B.

I/OException

C.

ArrayIndexOutOfBoundsException

D.

NullPointerException

GIAC GSSP-Java Premium Access
Questions 12

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.

Options:
A.

private int ReadText(long x) { return 0; }

B.

protected long ReadText(int x, int y) { return 0; }

C.

protected long ReadText(long x) { return 0; }

D.

protected int ReadText(long x) { return 0; }

E.

private int ReadText(int x) { return 0; }

F.

public int ReadText(int x) { return 0; }

G.

protected long ReadText(int x) { return 0; }

Questions 13

Which of the following statements is true about the Java synchronized keyword?

Options:
A.

It prevents multiple threads from accessing a block of code at the same time.

B.

It allows the class to be loaded as soon as the JRE starts.

C.

It prevents multiple developers from code redundancy.

D.

It allows two different functions to execute in a shared manner.

Questions 14

Identify whether the given statement is true or false.

"A try statement can be placed inside the code block that follows another try statement."

Options:
A.

True

B.

False

Questions 15

In which of the following locations the helper classes of a session bean class reside?

Options:
A.

EJB JAD file

B.

Deployment descriptor

C.

META-INF directory

D.

EJB JAR file

Questions 16

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.

Options:
A.

Annotate method doPrint() with @RolesAllowed({"ADMIN","MANAGER"}).

B.

Annotate method doPrint() with @PermitAll.

C.

If EJBContext.isCallerInRole("ADMIN") returns true, implement the behavior defined for MANAGER in role "ADMIN".

D.

If EJBContext.getCallerPrincipal returns role "ADMIN", implement the behavior for MANAGER in role ADMIN.

Questions 17

Which of the following exceptions will be thrown by the getFeature() method if the feature value cannot be assigned or retrieved?

Options:
A.

IllegalArgumentException

B.

SAXNotSupportedException

C.

NullPointerException

D.

SAXNotRecognizedException

Questions 18

Which of the following is a mandatory sub-element of the <web-resource-collection> element of the deployment descriptor?

Options:
A.

<web-resource-name>

B.

C.

<http-method>

D.

Questions 19

Which of the following methods belongs to the Refreshable interface?

Options:
A.

commit

B.

destroy

C.

isReadOnly

D.

isCurrent

Questions 20

The ______________ method of the EJBContext interface tests whether the client is a member of the role specified in the argument to the method.

Options:
A.

isMember()

B.

isAuthorized()

C.

getCallerPrincipal()

D.

isCallerInRole(String rolw)

E.

getUserTransaction()

Exam Code: GSSP-Java
Certification Provider: GIAC
Exam Name: GIAC Secure Software Programmer – Java
Last Update: Sep 12, 2025
Questions: 275

GIAC Free Exams

GIAC Free Exams
Prepare for GIAC certification with free access to reliable study resources and practice tests at Examstrack.