Winter Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: s2p65

Easiest Solution 2 Pass Your Certification Exams

GSSP-Java GIAC Secure Software Programmer – Java Free Practice Exam Questions (2025 Updated)

Prepare effectively for your GIAC GSSP-Java GIAC Secure Software Programmer – Java certification with our extensive collection of free, high-quality practice questions. Each question is designed to mirror the actual exam format and objectives, complete with comprehensive answers and detailed explanations. Our materials are regularly updated for 2025, ensuring you have the most current resources to build confidence and succeed on your first attempt.

Page: 4 / 5
Total 275 questions

Which of the following options are available with jar files?

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

A.

M - Deletes an existing manifest file

B.

c - Creates a jar file

C.

o - Overrides an existing jar file

D.

0 - Stores a file without using zip compression

E.

m - Manipulates or updates an existing jar file

F.

u - Unzips a jar file

G.

M - Creates a manifest file

Dennis works as a Programmer in Broadnet Inc. He writes the following program.

1. public class Ques0307{

2. public static void main(String[] argv){

3. int arr[] = {1, 2, 3, 4};

4. try{

5. int k = 0;

6. for(; k < 4; k++)

7. arr[k] = arr[k] + 1;

8. System.out.println("try");

9. }

10. catch(ArrayIndexOutOfBoundsException a){

11. System.out.println("index " +k +" not found");

12. }

13. catch(Exception e){

14. System.out.println("catch1");

15. }

16. finally{

17. System.out.println("finally");

18. }

19. }

20. }

What will happen when Dennis attempts to compile and execute the program?

A.

A compile-time error will occur.

B.

The program will display index 0 not found catch1 finally

C.

The program will display index 4 not found finally

D.

The program will display try finally

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?

A.

It will not compile because the Double class does not contain the toHexString() method.

B.

It will compile and execute successfully and will display 8p312 as the output.

C.

It will compile and execute successfully and will display 0x1.8p312.0 as the output.

D.

It will not compile because the Double class does not contain the toString() method.

Which of the following actions can you take to seal two packages, PackageA and PackageB, in the JAR file MyJar.jar?

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

A.

Execute the following command.

jar cvf MyJar.jar Manifest.txt MyPackage/*.class

B.

Create a text file named Manifest.txt with the following contents.

Name. myCompany/*Sealed. true

C.

Execute the following command.

jar cmf MyJar.jar Manifest.txt MyPackage/*.class

D.

Create a text file named Manifest.txt with the following contents.

Name. myCompany/PackageA/Sealed. true

Name. myCompany/PackageB/

Sealed. true

Which of the following methods must be implemented by each subclass of the Permission class to compare permissions?

A.

hashcode

B.

implies

C.

newPermissionCollection

D.

equals

Which of the following are valid thread state transitions?

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

A.

From running to ready.

B.

From ready to waiting.

C.

From running to waiting.

D.

From waiting to ready.

E.

From ready to running.

F.

From waiting to running.

Mark works as a Programmer for InfoTech Inc. He creates a program that uses the following code.

1. class Book

2. {

3. Short f1= 15;

4. Book GetDetails(Book b1)

5. {

6. b1=null;

7. return b1;

8. }

9. public static void main(String args[])

10. {

11. Book b1 = new Book();

12. Book b2 = new Book();

13. Book b3 = b1.GetDetails(b2);

14. b1=null;

15. //code

16. }

17. }

How many objects will be eligible for garbage collection when line 15 is reached?

A.

It cannot be determined.

B.

1

C.

2

D.

0

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.

getCallerPrincipal()

B.

getRollbackOnly()

C.

getUserTransaction()

D.

isCallerInRole()

Which of the following statements about the <auth-constraint> element are true?

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

A.

It is an optional sub-element of the element.

B.

It has and as its sub-elements.

C.

If the <auth-constraint> element is not present, all users can access the resource.

D.

If the <auth-constraint> element has no sub-element, all users can access the resource.

Which of the following statements about programmatic security are true?

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

A.

The bean provider is responsible for writing code for programmatic security.

B.

It is also called as instance level security.

C.

It is implemented using methods of the EJBContext interface.

D.

It is implemented using the methods of the UserTransaction interface.

Which of the following methods is used to authenticate the users, and if the user has not been authenticated, the method returns false?

A.

getCallerPrincipal()

B.

getRemoteUser()

C.

isUserInRole()

D.

getCallerIdentity()

Mark works as a Programmer for InfoTech Inc. He develops a Web application that takes input from users. Which of the following methods can be used by the client and server to validate the users input?

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

A.

Validation through Servlets on the server side

B.

Validation using JavaScript on the client side

C.

Validation through Java Applets on the client side

D.

Validation through XML on the server side

Which of the following web-resource element descriptions will be used if you want to restrict all URL's in the application and perform authentication for the http delete method?

A.

AccountServlet

/*

GET

DELETE

<auth-constraint>

Manager

</auth-constraint>

B.

*

GET

DELETE

<auth-constraint>

Manager

</auth-constraint>

C.

AccountServlet

/*

GET

DELETE

<auth-constraint>

Manager

</auth-constraint>

D.

AccountServlet

*

GET

DELETE

<auth-constraint>

Manager

</auth-constraint>

Which of the following exceptions will be thrown if the caller does not have permission to invoke the doAsPrivileged method?

A.

LoginException

B.

NullPointerException

C.

SecurityException

D.

PrivilegedActionException

Which of the following methods belongs to the FilterConfig interface and ServletConfig interface both?

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

A.

getInitParameter()

B.

getServletContext()

C.

getFilterName()

D.

getInitParameterNames()

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.

A.

Object obj=binding1.getSession().getAttribute("Attribute1");

B.

Object obj=binding1.getAttribute("Attribute1");

C.

Long MyAttribute=session1.getAttribute("Attribute1");

D.

String str1=session1.getAttribute("Attribute1");

E.

Object obj=session1.getAttribute("Attribute1");

Which of the following statements about a native modifier in Java are true?

Each correct answer represents a complete solution. Choose two.

A.

It can be applied to methods and variables.

B.

A method with a native modifier must end with a semicolon.

C.

It can be applied only to methods.

D.

It can be applied only to variables.

E.

A separate Java class must be written to provide implementation for a native method.

Which of the following statements about the isCallerInRole() method are true?

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

A.

It can be called from the PostConstruct and PreDestroy callback methods of a stateful session bean.

B.

It is present in the UserTransaction interface.

C.

It cannot be called from a message-driven bean.

D.

It can be invoked only from the business method of an enterprise bean.

Which of the following code declarations are valid error-page declarations?

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

A.

java.lang.ArithmeticException

304

<location>NumericalException.jsp

B.

304

<location>NumericalException.jsp

C.

304

NumericalException.jsp

D.

java.lang.ArithmeticException

<location>NumericalException.jsp

E.

304

<location>NumericalException.jsp

Which of the following classes is an engine class that provides an opaque representation of cryptographic parameters?

A.

DSAPublicKeySpec

B.

AlgorithmParameterGenerator

C.

DSAParameterSpec

D.

AlgorithmParameters

Page: 4 / 5
Total 275 questions
Copyright © 2014-2025 Solution2Pass. All Rights Reserved