Exam Details

  • Exam Code
    :GSSP-JAVA
  • Exam Name
    :GIAC Secure Software Programmer – Java
  • Certification
    :GIAC Information Security
  • Vendor
    :GIAC
  • Total Questions
    :275 Q&As
  • Last Updated
    :May 16, 2024

GIAC GIAC Information Security GSSP-JAVA Questions & Answers

  • Question 231:

    Mark works as a Programmer for InfoTech Inc. He develops a session bean class named accountService. Which of the following rules must be conformed by the session bean class? Each correct answer represents a complete solution. Choose all that apply.

    A. It can be used without the @Stateful or @Stateless annotation.

    B. It must implement the business methods defined in the business interface.

    C. It can implement any optional business method annotated by the @Remove annotation.

    D. It must have a public constructor that takes a string as its parameter.

    E. It requires helper classes to meet the needs of an application.

  • Question 232:

    Which of the following methods performs the authentication of subject and, if successful, associates Principals and Credentials with the authenticated Subject?

    A. The getSubject() method of the LoginContext class

    B. The login() method of the LoginModule interface

    C. The login() method of the LoginContext class

    D. The initialize() method of the LoginModule class

  • Question 233:

    What will be the output of the following program?

    class Stringtest { public static void main(String args[]) { String s= "test";\ concat("paper"); System.out.println(s); } }

    A. It will display test.

    B. It will display testpaper.

    C. It will generate a compile-time error.

    D. It will display paper.

  • Question 234:

    Mark works as an Application Developer for XYZ Solutions Inc. He writes the following code. public class TestDemo{public static void main(String[] args){ {try{int x =0;int d= 5/x;}catch(Exception ex) {System.out.println("Exception");} catch(ArithmeticException ae){System.out.println("Arithmetic Exception");}}} What is the result when Mark tries to compile and execute the code?

    A. Exception

    B. An exception is thrown at runtime.

    C. Compilation fails.

    D. Arithmetic Exception

  • Question 235:

    Which directory in JAR files is used to store package and extension configuration data?

    A. META-INF

    B. GAMMA-INF

    C. ZIP-INF

    D. TAR-INF

  • Question 236:

    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

  • Question 237:

    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.

  • Question 238:

    You work as a Programmer for InfoTech Inc. You write the following code.

    1.

    public class InnerDemo{

    2.

    public static void main(String[] args) {

    3.

    Car c = new Car();

    4.

    // insert code here

    5.

    e.test();

    6.

    }

    7.

    }

    8.

    class Car{

    9.

    class Engine{

    10.

    void test() {System.out.println("test"); }

    11.

    }

    12.

    }

    Which of the following options should you add to line 4 so that the code compiles and produces the output "test"?

    A. Car.Engine e = c.new Engine();

    B. Engine e = c. new Engine();

    C. c.Engine e = Car.new Engine();

    D. Car.Engine e = Car.new Engine();

  • Question 239:

    Which of the following methods of the HttpServletResponse interface is used for URL rewriting? Each correct answer represents a complete solution. Choose all that apply.

    A. encodeURL

    B. encodeRedirectURL

    C. sendRedirect

    D. getRequestURL()

  • Question 240:

    You work as a Software Developer for NewTech Inc. You write a bean class using Enterprise

    JavaBeans 3.0. The class uses the @DeclareRoles ("ADMIN, HR, DBA, USER") annotation to declare the security roles. The class contains a method named showResult(). You want to ensure that the ADMIN role is granted privilege to the showResult() method. Moreover, if a role that is not allowed to access the method tries to call the method, an error message must be shown. Assuming that there is no security-related element in the deployment descriptor, which of the following will you use to accomplish the task? Each correct answer represents a part of the solution. Choose two.

    A. The isCallerInRole() method

    B. The getCallerPrincipal() method

    C. The @RolesAllowed("ADMIN") annotation

    D. The @PermitAll annotation

Tips on How to Prepare for the Exams

Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only GIAC exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your GSSP-JAVA exam preparations and GIAC certification application, do not hesitate to visit our Vcedump.com to find your solutions here.