Weekend Sale - 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: dm70dm

GSSP-Java GIAC Secure Software Programmer - Java Questions and Answers

Questions 4

Consider the given lines of codE.

package ucert

class memberaccess

{

public int mem = 10;

}

Which of the following can directly access the variable mem?

Options:

A.

Any class

B.

Any class that extends the memberaccess class

C.

Only the memberaccess class

D.

Any class in the package ucert

Buy Now
Questions 5

Which of the following data type values is returned by the System.in.read() console input function?

Options:

A.

String

B.

Integer

C.

Float

D.

Character

Buy Now
Questions 6

Which of the following JDBC interfaces is described in the statement below?

"It provides support for executing SQL statements and stored procedures."

Options:

A.

Driver

B.

ResultSet

C.

PreparedStatement

D.

Connection

Buy Now
Questions 7

You work as a Software Developer for UcTech Inc. You want to declare a security constraint in the deployment descriptor using the element. Which of the following can be the possible values for the element?

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

Options:

A.

CONFIDENTIAL

B.

ALL

C.

NONE

D.

INTEGRAL

Buy Now
Questions 8

You work as a Software Developer for UcTech Inc. You build an online book shop, so that users can purchase books using their credit cards. You want to ensure that only the administrator can access the credit card information sent by users. Which security mechanism will you use to accomplish the task?

Options:

A.

Confidentiality

B.

Authorization

C.

Authentication

D.

Data integrity

Buy Now
Questions 9

Which of the following classes is an engine class that provides an opaque representation of cryptographic parameters?

Options:

A.

DSAPublicKeySpec

B.

AlgorithmParameterGenerator

C.

DSAParameterSpec

D.

AlgorithmParameters

Buy Now
Questions 10

Which of the following elements of the java.util.logging package exports objects to a variety of destinations including memory, output streams, consoles, files, and sockets?

Options:

A.

LogRecord

B.

Filter

C.

Logger

D.

Handler

Buy Now
Questions 11

Which of the following is a mandatory sub-element of the element of the deployment descriptor?

Options:

A.

B.

C.

D.

Buy Now
Questions 12

You work as a Software Developer for Relix Inc. You have written the following code. class Test {protected void show(){}}

Now you want to override the method show() in the subclass of Test. Which of the following access

specifiers can you use to override this method?

Each correct answer represents a complete solution. Choose two.

Options:

A.

protected

B.

default (no access specifier)

C.

private

D.

public

Buy Now
Questions 13

Which of the following code fragments will throw NumberFormatException?

Options:

A.

Double dbl = new Double(true);

B.

Character ch = new Character('A');

C.

Float flt = new Float("true");

D.

Boolean bool = new Boolean("123");

Buy Now
Questions 14

John works as a Programmer for Technostar Inc. He writes the following code using Java.

1. class WrapperClass{

2. public static void main(String[] argv){

3. String str2 = Double.toString(12);

4. String str1 = Double.toHexString(12);

5. System.out.println(str1+str2);

6. }

7. }

What will happen when John attempts to compile and execute the code?

Options:

A.

It will not compile because the Double class does not contain the toHexString() method.

B.

It will compile and execute successfully and will display 8p312 as the output.

C.

It will compile and execute successfully and will display 0x1.8p312.0 as the output.

D.

It will not compile because the Double class does not contain the toString() method.

Buy Now
Questions 15

Given below are top-level class declarations. Which of these class declarations would not produce a compile-time error?

abstract class P {} //1

private class Q {} //2

static class R {} //3

transient class S {} //4

Options:

A.

Line 3

B.

Line 1

C.

Line 2

D.

Line 4

Buy Now
Questions 16

Which of the following statements about a native modifier in Java are true?

Each correct answer represents a complete solution. Choose two.

Options:

A.

It can be applied to methods and variables.

B.

A method with a native modifier must end with a semicolon.

C.

It can be applied only to methods.

D.

It can be applied only to variables.

E.

A separate Java class must be written to provide implementation for a native method.

Buy Now
Questions 17

You work as a Software Developer for NewTech Inc. You want to configure the deployment descriptor so as to specify the error pages used in the FORM based authentication. Which of the following elements will you use to accomplish the task?

Options:

A.

The sub-element of the element.

B.

The sub-element of the element.

C.

The sub-element of the element.

D.

The <form-login-config> sub-element of the element.

Buy Now
Questions 18

Which of the following methods returns a Cipher object that implements the specified transformation?

Options:

A.

getCallerIdentity()

B.

getObject()

C.

getHeader()

D.

getInstance()

Buy Now
Questions 19

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

1. public class Header

2. {

3. //code//

4. {

5. System.out.println("Print the code.");

6. super.finalize();

7. }

8. }

Which of the following header statements should be placed at line 3 to execute the program

successfully?

Options:

A.

void finalize() throws Exception

B.

private void finalize() throws Exception

C.

protected void finalize() throws Throwable

D.

void finalize() throws Throwable

Buy Now
Questions 20

Mark works as a Programmer for InfoTech Inc. He develops a Website that uses HTML and processes HTML validation. Which of the following are the advantages of the HTML application?

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

Options:

A.

It provides password protection for a Web page or directory

B.

It can be accessed by more visitors.

C.

It provides faster loading.

D.

It is easier to update and maintain the site.

E.

It protects the source or images of a HTML Web page.

F.

It puts less load on the server.

Buy Now
Questions 21

Which of the following methods are used in the verification of a signature?

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

Options:

A.

initVerify

B.

update

C.

verify

D.

initSign

Buy Now
Questions 22

Which of the following statements make a message-driven bean different from a session bean?

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

Options:

A.

Multiple clients can be processed by a single message-driven bean.

B.

A message-driven bean has only one bean class.

C.

Clients do not access message-driven beans through interfaces.

D.

The EJB container can assign a message to any message-driven bean instance because all instances of a message-driven bean are equivalent.

E.

Data or conversational state for a specific client cannot be retained by message-driven bean instances.

Buy Now
Questions 23

Which of the following methods is used to preallocate room for a certain number of characters after a StringBuffer has been constructed?

Options:

A.

capacity()

B.

ensureCapacity()

C.

setCapacity()

D.

allocateCapacity()

Buy Now
Questions 24

Which of the following methods of the java.util.logging package logs a message, specifying source class and method, with associated Throwable information?

Options:

A.

logrb

B.

log

C.

logp

D.

logth

Buy Now
Questions 25

You work as an Application Deployer for UcTech Inc. You want to configure a filter for a Web application using the deployment descriptor. Which of the following attributes are mandatory for you to implement in order to accomplish the task?

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

Options:

A.

B.

C.

D.

Buy Now
Questions 26

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

package Mark.tutorial.javaee.ejb;

import java.util.logging.Logger;

import javax.annotation.Resource;

import javax.ejb.Stateless;

import javax.ejb.Timeout;

import javax.ejb.Timer;

import javax.ejb.TimerService;

@Stateless

public class TimerBean implements TimerSessionBean {

@Resource

TimerService timerService;

private static final Logger logger = Logger.getLogger

("com.sun.tutorial.javaee.ejb.timersession.TimerSessionBean");

public void createTimer(long intervalDuration) {

Timer timer = timerService.createTimer(intervalDuration, "New timer created");

}

@Timeout

public void timeout(Timer timer) {

logger.info("Timer Timeout");

}

}

which of the following statements are true about the code?

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

Options:

A.

The class Logger cannot be used with a stateless session bean.

B.

The EJB container will invoke the timeout method of TimerSessionBean when the timer expires.

C.

The class is using the createTimer method incorrectly because it creates a new timer.

D.

TimerBean is a stateless session bean that shows how to set a timer.

Buy Now
Questions 27

You work as a Software Developer for UcTech Inc. You want the deployment descriptor to contain entries for the authentication type and the security realm. In order to accomplish this, you have to use the sub-elements of the element. Which of the following will you use?

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

Options:

A.

<auth-name>

B.

C.

<auth-type>

D.

<form-login-config>

E.

F.

G.

<auth-method>

Buy Now
Questions 28

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.

Buy Now
Questions 29

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

Buy Now
Questions 30

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

Options:

A.

java.security.Permissions

B.

java.security.PermissionCollection

C.

java.security.UnresolvedPermission

D.

java.security.Permission

Buy Now
Questions 31

Which of the following statements about the isUserInRole() method are true?

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

Options:

A.

It accepts a boolean argument.

B.

It is mapped in the deployment descriptor using the element.

C.

It belongs to the HttpServletResponse interface.

D.

The sub-element of the element must match the sub-element of the element.

Buy Now
Questions 32

Which of the following classes implements the java.lang.Cloneable and java.lang.Runnable interfaces correctly?

Options:

A.

public class DemoThread implements Runnable, Cloneable {

public void run() { /* some code here */ }

protected boolean clone() throws CloneNotSupportedException { /* some code here */ }

. . . .

}

B.

public class PrintData implements Runnable, Cloneable {

public void run() { /* some code here */ }

protected Object clone() throws CloneNotSupportedException { /* some code here */ }

. . . .

}

C.

public class CloneCheck implements Runnable, Cloneable {

public int run() { /* some code here */ }

public Object clone() throws CloneNotSupportedException { /* some code here */ }

. . . .

}

D.

public class Demo implements Runnable, Cloneable {

public void run() { /* some code here */ }

. . . .

}

Buy Now
Questions 33

Which of the following methods of the javax.ejb.EJBContext interface allows the bean provider to access security information about the enterprise bean's caller?

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

Options:

A.

getCallerIdentity()

B.

getCallerPrincipal()

C.

getEnvironment()

D.

isCallerInRole()

Buy Now
Questions 34

Which of the following init() method calls initializes a cipher object with a key in the SECRET_MODE?

Options:

A.

cipher.init(2, key);

B.

cipher.init(1, key);

C.

cipher.init(3, key);

D.

cipher.init(4, key);

Buy Now
Questions 35

Identify whether the given statement is true or false.

"If the isUserInRole() method is called on an unauthenticated user, the container returns false."

Options:

A.

True

B.

False

Buy Now
Questions 36

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.

Options:

A.

The isCallerInRole() method

B.

The getCallerPrincipal() method

C.

The @RolesAllowed("ADMIN") annotation

D.

The @PermitAll annotation

Buy Now
Questions 37

Which of the following elements indicates which users in specified roles are permitted access to a resource collection?

Options:

A.

auth-constraint

B.

user-data-constraint

C.

web-resource-collection

D.

login-config constraint

Buy Now
Questions 38

Which of the following statements are true?

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

Options:

A.

An inner class cannot be defined as private.

B.

An inner class cannot be defined as protected.

C.

An inner class can be defined as private.

D.

An inner class can extend another class.

Buy Now
Questions 39

Identify whether the given statement is true or false.

"An object becomes eligible for garbage collection when it becomes unreachable by any code."

Options:

A.

False

B.

True

Buy Now
Questions 40

Which of the following JAR file options is used for creating an archive?

Options:

A.

-v

B.

-u

C.

-x

D.

-c

Buy Now
Questions 41

Which of the following classes of java.util.logging prints a brief summary of the LogRecord in a human readable format?

Options:

A.

XMLFormatter

B.

SimpleFormatter

C.

StreamHandler

D.

MemoryHandler

Buy Now
Exam Code: GSSP-Java
Exam Name: GIAC Secure Software Programmer - Java
Last Update: Jun 30, 2025
Questions: 275

PDF + Testing Engine

$49.5  $164.99

Testing Engine

$37.5  $124.99
buy now GSSP-Java testing engine

PDF (Q&A)

$31.5  $104.99
buy now GSSP-Java pdf
dumpsmate guaranteed to pass
24/7 Customer Support

DumpsMate's team of experts is always available to respond your queries on exam preparation. Get professional answers on any topic of the certification syllabus. Our experts will thoroughly satisfy you.

Site Secure

mcafee secure

TESTED 05 Jul 2025