[Free] 2017(Sep) CollectDumps Testking GIAC GSSP-Java Dumps with VCE and PDF 11-20

CollectDumps 2017 Sep GIAC Official New Released GSSP-Java
100% Free Download! 100% Pass Guaranteed!
http://www.CollectDumps.com/GSSP-Java.html

GIAC Secure Software Programmer – Java

Question No: 11 – (Topic 1)

Given a code of a class named PrintString that prints a string.

  1. public class PrintString{

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

  3. /*insert code here */

  4. /* insert code here */

  5. System.out.println(str); 6. }

    7. }

    Which of the following code fragments can be inserted in the class PrintString to print the output quot;4247quot;?

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

    1. StringBuilder str= new StringBuilder(quot;123456789quot;);

      str.delete(0,3).replace(1,3,quot;24quot;).delete(4,6);

    2. StringBuffer str= new StringBuffer(quot;123456789quot;); str.delete(0,3).replace(1,3,quot;24quot;).delete(4,6);

    3. StringBuffer str=new StringBuffer(quot;123456789quot;); str.substring(3,6).delete(1,2).insert(1,quot;24quot;);

    4. StringBuilder str= new StringBuilder(quot;123456789quot;); str.deleteCharAt(6).replace(1,3,quot;24quot;).delete(0,3);

E. String str=quot;123456789quot;;

str=(str-quot;123quot;).replace(1,3,quot;24quot;)-quot;89quot;;

Answer: A,B

Question No: 12 – (Topic 1)

Mark writes a class Practice.java. This class needs to access the com.bar.Test class that is stored in the Test.jar file in the directory /practice. How would you compile your code?

  1. javac -classpath /practice/Test.jar Practice.java

  2. javac -classpath /practice/ Practice.java

  3. javac -classpath /practice/Test.jar/com/bar Practice.java

  4. javac -classpath /practice Practice.java

Answer: A

Question No: 13 – (Topic 1)

Which of the following statements is true?

  1. All UTF characters are eight bits long.

  2. All UTF characters are all sixteen bits long.

  3. All UTF characters are twenty four bits long.

  4. All bytecode characters are sixteen bits long.

  5. All unicode characters are sixteen bits long.

    Answer: E

    Question No: 14 – (Topic 1)

    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?

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

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

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

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

Answer: C

Question No: 15 – (Topic 1)

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.

  1. It provides password protection for a Web page or directory

  2. It can be accessed by more visitors.

  3. It provides faster loading.

  4. It is easier to update and maintain the site.

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

  6. It puts less load on the server.

    Answer: B,C,D,F

    Question No: 16 – (Topic 1)

    You have written the following code snippet.

    1. public class Read {

    2. protected int ReadText(int x) { return 0; } 3. }

  1. class Text extends Read {

  2. /*insert code here*/ 6. }

    Which of the following methods, inserted independently at line 5, will compile? Each correct answer represents a complete solution. Choose all that apply.

    1. private int ReadText(long x) { return 0; }

    2. protected long ReadText(int x, int y) { return 0; }

    3. protected long ReadText(long x) { return 0; }

    4. protected int ReadText(long x) { return 0; }

    5. private int ReadText(int x) { return 0; }

    6. public int ReadText(int x) { return 0; }

    7. protected long ReadText(int x) { return 0; }

Answer: A,B,C,D,F

Question No: 17 – (Topic 1)

You work as a Software Developer for UcTech Inc. You create a session using the HttpSession interface. You want the attributes to be informed when the session is moved from one JVM to another and also when an attribute is added or removed from the session. Which of the following interfaces can you use to accomplish the task?

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

  1. HttpSessionBindingListener

  2. HttpSessionListener

  3. HttpSessionActivationListener

  4. HttpSessionAttributeListener

Answer: C,D

Question No: 18 – (Topic 1)

Which of the following statements are true?

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

  1. An inner class cannot be defined as private.

  2. An inner class cannot be defined as protected.

  3. An inner class can be defined as private.

  4. An inner class can extend another class.

Answer: C,D

Question No: 19 – (Topic 1)

You work as a programmer for PassGuide.Inc. You have a session object named session1 with an attribute named Attribute1, and an HttpSessionBindingEvent object binding1 bound to session1.

Which of the following will be used to retrieve Attribute1?

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

  1. Object obj=binding1.getSession().getAttribute(quot;Attribute1quot;);

  2. Object obj=binding1.getAttribute(quot;Attribute1quot;);

  3. Long MyAttribute=session1.getAttribute(quot;Attribute1quot;);

  4. String str1=session1.getAttribute(quot;Attribute1quot;);

  5. Object obj=session1.getAttribute(quot;Attribute1quot;);

Answer: A,E

Question No: 20 – (Topic 1)

Which of the following statements about a JAR file are true?

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

  1. It cannot be accessed through a class path, nor they can be used by java and javac.

  2. It is used to compress and archive data.

  3. It can be moved from one computer to another.

  4. It is created by using the jar command.

Answer: B,C,D

100% Free Download!
Download Free Demo:GSSP-Java Demo PDF
100% Pass Guaranteed!
Download 2017 CollectDumps GSSP-Java Full Exam PDF and VCE

CollectDumps ExamCollection Testking
Lowest Price Guarantee Yes No No
Up-to-Dated Yes No No
Real Questions Yes No No
Explanation Yes No No
PDF VCE Yes No No
Free VCE Simulator Yes No No
Instant Download Yes No No

2017 CollectDumps IT Certification PDF and VCE