Skip to main content

GSSP-JAVA Online Exam

GIAC Secure Software Programmer - Java

275 questions available ยท Page 1 of 28

View study plans
Question 1 Fill in the blank

FILL BLANK

Fill in the______blank with the required interface name to complete the statement below.
An object of the interface is provided by the container to invoke the next filter in a chain of filters.

Show answer and explanation

Accepted answer: Answer: FilterChain

Question 2 Drag & drop

DRAG DROP

the appropriate authentication types from the given options to match their properties.

Question diagram
Show answer and explanation
Correct answer diagram
Question 3 Multiple choice

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.

  1. A

    Validation through Servlets on the server side

  2. B

    Validation using JavaScript on the client side

  3. C

    Validation through Java Applets on the client side

  4. D

    Validation through XML on the server side

Show answer and explanation

Correct answers: A, B

Question 4 Single choice

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

  1. A

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

  2. B

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

  3. C

    It prevents multiple developers from code redundancy.

  4. D

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

Show answer and explanation

Correct answer: A

Question 5 Multiple choice

Which of the following statements about a JAR file are true? Each correct answer represents a complete solution. Choose all that apply.

  1. A

    It cannot be accessed through a class path, nor they can be used by java and javac.

  2. B

    It is used to compress and archive data.

  3. C

    It can be moved from one computer to another.

  4. D

    It is created by using the jar command.

Show answer and explanation

Correct answers: B, C, D

Question 6 Multiple choice

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.

  1. A

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

  2. B

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

  3. C

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

  4. D

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

  5. E

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

Show answer and explanation

Correct answers: A, E

Question 7 Multiple choice

Which of the following statements are true?
Each correct answer represents a complete solution. Choose all that apply.

  1. A

    An inner class cannot be defined as private.

  2. B

    An inner class cannot be defined as protected.

  3. C

    An inner class can be defined as private.

  4. D

    An inner class can extend another class.

Show answer and explanation

Correct answers: C, D

Question 8 Multiple choice

You work as a Software Developer for UcTech Inc. You create a session using the HttpSession interface.
You want the attributes to be informed when the session is moved from one JVM to another and also when an attribute is added or removed from the session. Which of the following interfaces can you use to accomplish the task?
Each correct answer represents a complete solution. Choose all that apply.

  1. A

    HttpSessionBindingListener

  2. B

    HttpSessionListener

  3. C

    HttpSessionActivationListener

  4. D

    HttpSessionAttributeListener

Show answer and explanation

Correct answers: C, D

Question 9 Multiple choice

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.

  1. A

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

  2. B

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

  3. C

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

  4. D

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

  5. E

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

  6. F

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

  7. G

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

Show answer and explanation

Correct answers: A, B, C, D, F

Question 10 Single choice

The following JSP scriptlet is given.
<% response.setContentType("text/html; charset=ISO-8859-1"); %>

Which of the following directives is the equivalent directive for the scriptlet given above?

  1. A

    <%@ include contentType="text/html; pageEncoding=ISO-8859-1" %>

  2. B

    <%@ include contentType="text/html; charset=ISO-8859-1" %>

  3. C

    <%@ page contentType="text/html; charset=ISO-8859-1" %>

  4. D

    <%@ taglib contentType="text/html; pageEncoding=ISO-8859-1" %>

Show answer and explanation

Correct answer: C