1z0-808Java SE 8 Programmer I 2015-12-14.pdf

A 100 b 101 c 102 d 103 e compilation fails correct

Info icon This preview shows pages 20–33. Sign up to view the full content.

A. 100 B. 101 C. 102 D. 103 E. Compilation fails Correct Answer: E Section: (none) Explanation Explanation/Reference: QUESTION 20
Image of page 20

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Given: What is the result? A. 91 98 99 100 null null null B. 91 98 99 100 101 102 103 C. Compilation rails. D. A NullPointerException is thrown at runtime. E. An ArraylndexOutOfBoundsException is thrown at runtime. Correct Answer: A Section: (none) Explanation
Image of page 21
Explanation/Reference: QUESTION 21 Given the code fragment: Which two modifications, when made independently, enable the code to print joe:true: 100.0?
Image of page 22

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

A. Option A B. Option B C. Option C D. Option D E. Option E Correct Answer: AC Section: (none) Explanation Explanation/Reference: QUESTION 22 Given the code fragment:
Image of page 23
What is the result? A. [Robb, Rick, Bran] B. [Robb, Rick] C. [Robb, Bran, Rick, Bran] D. An exception is thrown at runtime. Correct Answer: A Section: (none) Explanation Explanation/Reference: QUESTION 23 Given:
Image of page 24

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

What is the result? A. C B A B. C C. A B C D. Compilation fails at line n1 and line n2 Correct Answer: C Section: (none) Explanation
Image of page 25
Explanation/Reference: QUESTION 24 Given: What is the result? A. 3 4 5 6 B. 3 4 3 6 C. 5 4 5 6 D. 3 6 4 6 Correct Answer: C Section: (none) Explanation Explanation/Reference: QUESTION 25 Given the code fragment:
Image of page 26

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Which code fragment, when inserted at line 3, enables the code to print 10:20? A. int[] array n= new int[2]; B. int[] array; array = int[2]; C. int array = new int[2]; D. int array [2] ; Correct Answer: B Section: (none) Explanation Explanation/Reference: QUESTION 26 Given the code fragment: What is the result?
Image of page 27
A. A B C Work done B. A B C D Work done C. A Work done D. Compilation fails Correct Answer: C Section: (none) Explanation Explanation/Reference: QUESTION 27 Which three are advantages of the Java exception mechanism? A. Improves the program structure because the error handling code is separated from the normal program function B. Provides a set of standard exceptions that covers all the possible errors C. Improves the program structure because the programmer can choose where to handle exceptions D. Improves the program structure because exceptions must be handled in the method in which they occurred E. Allows the creation of new exceptions that are tailored to the particular program being created Correct Answer: ACD Section: (none) Explanation Explanation/Reference: Reference: QUESTION 28 Given the code from the Greeting.Java file: Which set of commands prints Hello Duke in the console?
Image of page 28

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

A. Option A B. Option B C. Option C D. Option D Correct Answer: C Section: (none) Explanation Explanation/Reference: QUESTION 29 Given:
Image of page 29
What is the result?
Image of page 30

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

A. Option A B. Option B C. Option C D. Option D Correct Answer: B Section: (none) Explanation Explanation/Reference: QUESTION 30 Given the code fragment: What is the result?
Image of page 31
A. 2 4 B. 0 2 4 6 C. 0 2 4 D. Compilation fails Correct Answer: C
Image of page 32

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Image of page 33
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '18
  • sajjad
  • Correct Answer, Madrid Metro, Metropolitana di Napoli, Rick, Robb

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern