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

Sure Pass Exam GSSP-Java PDF

Page: 5 / 10
Total 275 questions

GIAC Secure Software Programmer - Java Questions and Answers

Question 17

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"?

Options:

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 18

Which of the following deployment descriptor elements must contain the element as its mandatory sub-element?

Options:

A.

B.

C.

D.

Question 19

Which of the following methods is used to encrypt or decrypt data in a single step?

Options:

A.

wrap()

B.

update()

C.

digest()

D.

doFinal()

Question 20

You work as a Software Developer for BlueTech Inc. You create code using EJB 3.0. You want to ensure that each new record is checked for validation before it is inserted into the database. Which of the following callback methods will you use to write the logic for validation?

Options:

A.

PostUpdate

B.

PreUpdate

C.

PostLoad

D.

PrePersist

Page: 5 / 10
Total 275 questions