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

GIAC GSSP-Java - GIAC Secure Software Programmer – Java

Page: 1 / 9
Total 275 questions

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?

A.

LogRecord

B.

Filter

C.

Logger

D.

Handler

Which of the following statements about the element are true?

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

A.

It is an optional sub-element of the element.

B.

It has and as its sub-elements.

C.

If the element is not present, all users can access the resource.

D.

If the element has no sub-element, all users can access the resource.

Dennis works as a Programmer in Broadnet Inc. He writes the following program.

1. public class Ques0307{

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

3. int arr[] = {1, 2, 3, 4};

4. try{

5. int k = 0;

6. for(; k < 4; k++)

7. arr[k] = arr[k] + 1;

8. System.out.println("try");

9. }

10. catch(ArrayIndexOutOfBoundsException a){

11. System.out.println("index " +k +" not found");

12. }

13. catch(Exception e){

14. System.out.println("catch1");

15. }

16. finally{

17. System.out.println("finally");

18. }

19. }

20. }

What will happen when Dennis attempts to compile and execute the program?

A.

A compile-time error will occur.

B.

The program will display index 0 not found catch1 finally

C.

The program will display index 4 not found finally

D.

The program will display try finally

Which of the following options are available with jar files?

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

A.

M - Deletes an existing manifest file

B.

c - Creates a jar file

C.

o - Overrides an existing jar file

D.

0 - Stores a file without using zip compression

E.

m - Manipulates or updates an existing jar file

F.

u - Unzips a jar file

G.

M - Creates a manifest file

Which of the following is used to restore the objects that have been previously serialized by a stream?

A.

FileInputStream

B.

ObjectOutputStream

C.

ObjectInputStream

D.

FileOutputStream

Which of the following statements are true?

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

A.

StringBuffer is thread safe, but StringBuilder is not.

B.

The String class is final.

C.

StringBuilder offers faster performance than StringBuffer.

D.

The size of the String can be obtained using the length property.

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

A.

B.

C.

D.

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)

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

Each correct answer represents a complete solution. Choose two.

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.

Harry works as a Software Developer for SoftTech Inc. He has developed a Java application to perform various SQL statements such as INSERT, UPDATE, etc., against a database table named Employee. He has used the executeUpdate() method to perform various SQL queries and to know the exact affected rows in the database if any of the operations is performed against the database table.

Which of the following types of values is returned by this method?

A.

Double

B.

Integer

C.

Float

D.

String