Pre-Summer Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code = getmirror

Pass the GIAC Certification GSSP-Java Questions and answers with ExamsMirror

Practice at least 50% of the questions to maximize your chances of passing.
Exam GSSP-Java Premium Access

View all detail and faqs for the GSSP-Java exam


765 Students Passed

96% Average Score

90% Same Questions
Viewing page 5 out of 9 pages
Viewing questions 41-50 out of questions
Questions # 41:

Peter works as a Software Developer for Neon Inc. He is developing an application in Java. He declares an interface. Which of the following field declarations are valid within the body of an interface?

Each correct answer represents a complete solution. Choose three.

Options:

A.

final static int answer=42;

B.

public static int answer = 42;

C.

private final static int answer=42;

D.

public int answer=42;

E.

int answer;

Questions # 42:

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

. . . .

}

Questions # 43:

You have the following code of a PreparedStatement.

PreparedStatement stm = con.prepareStatement("UPDATE EMPLOYEES SET SALARY = ? WHERE ID = ?");

Which of the following statements are true about a PreparedStatement?

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

Options:

A.

The executeUpdate() method executes the SQL query in the PreparedStatement object and returns the ResultSet object generated by the query.

B.

A PreparedStatement reduces execution time if it is required to execute the SQL statementmultiple times.

C.

When the executeQuery() method is used to execute a DDL statement, such as in creating a table, it returns the int 0.

D.

It is illegal for an instance of a PreparedStatement to contain a SQL statement that has already been compiled.

Questions # 44:

Mary works as a Software Developer for ABC Solutions Inc. She writes the following code.

public class StringMethods {

public static void main(String[] args) {

String str = new String("abc");

str.concat("xyz");

StringBuffer strBuf = new StringBuffer(" 123");

strBuf.append(" no");

System.out.println(str + strBuf);}}

What will be the output when Mary tries to compile and execute the code?

Options:

A.

Compilation will fail.

B.

The program will print abc xyz 123 no when run.

C.

The program will print xyz 123 no when run.

D.

The program will print abc 123 no when run.

Questions # 45:

For which of the following purposes is the AccessController class used?

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

Options:

A.

To determine most of the parameters of the Java sandbox and whether particular operations should be permitted or rejected.

B.

To decide whether an access to a critical system resource is to be allowed or denied, based on the security policy currently in effect.

C.

To mark code as being "privileged", thus affecting subsequent access determinations.

D.

To obtain a "snapshot" of the current calling context so that access-control decisions from a different context can be made with respect to the saved context.

Questions # 46:

Given the following directory structure.

Question # 46

Assuming that the current directory is com, which of the below options can be used to create a jar file called TestJar.jar that contains all the files from the directory testApp?

Options:

A.

jar -zf TestJar.jar

B.

jar -cf TestJar.jar

C.

jar -tf TestJar.jar

D.

jar -cf TestJar.jar testApp

Questions # 47:

Roger works as a Software Developer for Tech Mart Inc. He creates an application using Enterprise JavaBeans. In the bean class, he writes a code snippet as follows.

Boolean b = ctx.isCallerInRole("Administrator");

The Application Assembler named Bob declares the following entries within the element of the deployment descriptor.

1.

2. The HR-Manager will have permission to access all the methods.

3. HR-Manager

4.

5.

Bob wants to ensure that the HR-Manager declared in the deployment descriptor has all the privileges of an administrator. Which of the following elements should Bob declare in line 4 while deploying the bean?

Options:

A.

B.

C.

D.

Questions # 48:

You work as a Software Developer for Developer Inc. You write the following code.

interface A {public boolean b = false;}

class C implements A {public static void main(String args[]) {b = true;System.out.println(b);}}

Which of the following will be the result, when you try to compile and execute the above code?

Options:

A.

The code will compile and print false.

B.

The code will compile, but it will not execute.

C.

The code will compile and print true.

D.

The code will not compile.

Questions # 49:

You work as a Software Developer for UcTech Inc. You want to ensure that a class is informed whenever an attribute is added, removed, or replaced in a session. Which of the following is the event that you will use to accomplish the task?

Options:

A.

HttpSessionEvent

B.

HttpSessionAttributeEvent

C.

HttpAttributeEvent

D.

HttpSessionBindingEvent

Questions # 50:

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

java.lang.Throwable

Error.jsp

javax.security.auth.RefreshFailedException

RefreshFailed.jsp

Which of the following statements is true about the deployment descriptor code given above?

Options:

A.

It is not possible to declare two error-page code in the web-app element.

B.

The error-page element does not belong to the web-app element.

C.

Any exception other than RefreshFailedException will display the Error.jsp page.

D.

All exceptions will display the Error.jsp page.

Viewing page 5 out of 9 pages
Viewing questions 41-50 out of questions
TOP CODES

TOP CODES

Top selling exam codes in the certification world, popular, in demand and updated to help you pass on the first try.