Pass4itsure > GIAC > GIAC Certifications > GSSP-JAVA > GSSP-JAVA Online Practice Questions and Answers

GSSP-JAVA Online Practice Questions and Answers

Questions 4

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");

Buy Now
Questions 5

Which of the following methods are overridden by the FileInputStream class? Each correct answer represents a complete solution. Choose all that apply.

A. void reset()

B. void write(int b)

C. void flush()

D. long skip(long numBytes)

Buy Now
Questions 6

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/*GETDELETEManager

B. *GETDELETEManager

C. AccountServlet/*GETDELETEManager

D. AccountServlet*GETDELETEManager

Buy Now
Questions 7

Mark works as a Programmer for InfoTech Inc. He develops the following security-constraint code.

Manager

/acme/Manager/*

GET

POST

// code

Manager

/acme/Manager/*

GET

POST

// code

Which of the following element declarations of the will allow

everybody to access the same resources?

A. Place the following code in the second declaration.*

B. Place the following code in the first declaration.ManagerPlace the following code in the second declaration.*

C. Place the following code in the first declaration.ManagerPlace the following code in the second declaration.ALL

D. Place the following code in the first declaration.ManagerPlace the following code in the second declaration.

Buy Now
Questions 8

Mark works as a Programmer for InfoTech Inc. He develops a program that defines a class named

Inventory that has an instance variable named NumOfItems. Which of the following properties will be

applied by NumOfItems?

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

A. It will not be visible in Static methods if it passed as a parameter.

B. It will be visible in Static methods if it passed as a parameter.

C. It will be available for all the instance methods of the class.

D. It becomes available for garbage collection if it is no longer in scope.

Buy Now
Questions 9

Which of the following is a Permission class whose permissions have no actions, and allows suppressing the standard Java programming language access checks?

A. java.awt.RuntimePermission

B. java.security.SecurityPermission

C. java.lang.reflect.ReflectPermission

D. java.lang.AllPermission

Buy Now
Questions 10

Which of the following statements are true about the doAs() and doAsPrivileged() methods? Each correct answer represents a complete solution. Choose all that apply.

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 viaAccessController.getContext.

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

Buy Now
Questions 11

You work as a Software Developer for NewTech Inc. You write a bean class called EmployeeBean. The class contains two methods, EmpSal() and EmpAttendance(). Both these methods can be accessed by the ADMIN role. The EmpSal() method can be accessed only by the HR role, while the EmpAttendance () method can be accessed only by the DBA role. You want the EmpAttendance() method to be accessed by the HR role also. However, no other roles in the class except ADMIN, DBA, and HR should be able to access the EmpAttendance() method. Which of the following steps will you take to accomplish the task? Each correct answer represents a complete solution. Choose all that apply.

A. Use the element of the deployment descriptor and declare the as DBA.

B. Use the @RunAs("ADMIN") annotation to allow the HR the privileges as ADMIN.

C. Use the @RunAs("DBA") annotation to allow the HR the privileges as DBA.

D. Use the element of the deployment descriptor to declare the role-name as DBA and the method-name as EmpAttendance.

E. Use the @PermitAll annotation with the EmpAttendance() method to allow the HR to access the EmpAttendance() method.

Buy Now
Questions 12

Which of the following permission classes is an abstract class ancestor of all permissions and defines the essential functionalities required for all permissions?

A. java.security.Permissions

B. java.security.PermissionCollection

C. java.security.UnresolvedPermission

D. java.security.Permission

Buy Now
Questions 13

Maria works as a Software Developer for Bluetech Inc. She develops a class named Warden that needs to access a class named Hostel, which is deployed in a JAR named City.JAR. What will she do in order to enable the Warden class to have access to the Hostel class during compilation?

A. She will place the JAR file in javaprog/City.JAR and set the class path environment to include javaprog/ City.JAR/Warden.class.

B. She will place the JAR file in javaprog/City.JAR and set the class path environment to include javaprog/ City.JAR/Hostel.class.

C. She will place the JAR file in $ JAVA_HOME/jre/lib/ext/City.JAR.

D. She will place the JAR file in $ JAVA_HOME/jre/classes/City.JAR.

Buy Now
Exam Code: GSSP-JAVA
Exam Name: GIAC Secure Software Programmer - Java
Last Update: Jan 04, 2025
Questions: 275
10%OFF Coupon Code: SAVE10

PDF (Q&A)

$49.99

VCE

$55.99

PDF + VCE

$65.99