New Year Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save70

Free GSSP-Java Questions Attempt

Page: 10 / 10
Total 275 questions

GIAC Secure Software Programmer - Java Questions and Answers

Question 37

Mark works as a Programmer for InfoTech Inc. He develops the following code snippet.

import java.util.*;

public class DemoSet{

public static void main(String[] args){

TreeSet ts = new TreeSet();

ts.add("Sunday");

ts.add("Friday");

ts.add("Wednesday");

ts.add("Sunday");

ts.add("Monday");

Iterator it = ts.iterator();

while(it.hasNext()){

System.out.print(it.next() + " ");

}

}

}

What will be the output when he tries to execute the given code snippet?

Options:

A.

Wednesday Sunday Monday Friday

B.

An exception will be thrown at runtime.

C.

Friday Monday Sunday Wednesday

D.

Sunday Monday Wednesday Friday

Question 38

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.

Options:

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.

Question 39

Which of the following pieces of codes will be placed at the line XXX to successfully compile the given class?

public interface Publication

{

String GetDetails();

}

public class Book implements Publication

{

//line XXX

}

Options:

A.

public String GetDetails(){}

B.

Object GetDetails(){}

C.

long GetDetails(){}

D.

private String GetDetails(){}

Question 40

Which of the following statements about the form-based authentication are true?

Each correct answer represents a complete solution. Choose two.

Options:

A.

It provides a weaker security check than the HTTP Digest and HTTPS Client authentications.

B.

It requires a hidden field that supplies the login-constraint used by the application.

C.

It requires that the action of the login form must be j_security_check.

D.

It transmits username and password over the network in the form of Base64 encoding.

Page: 10 / 10
Total 275 questions