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

D p r and s are accessible by obj correct answer b

Info icon This preview shows pages 39–53. Sign up to view the full content.

D. p, r, and s are accessible by obj. Correct Answer: B Section: (none) Explanation Explanation/Reference:
Image of page 39

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

QUESTION 40 Given: What is the result? A. Base DerivedA B. Base DerivedB
Image of page 40
C. DerivedB DerivedB D. DerivedB DerivedA E. A classcast Except ion is thrown at runtime. Correct Answer: C Section: (none) Explanation Explanation/Reference: QUESTION 41 Given the code fragment: What is the result?
Image of page 41

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

A. Execution terminates in the first catch statement, and caught a RuntimeException is printed to the console. B. Execution terminates In the second catch statement, and caught an Exception is printed to the console. C. A runtime error is thrown in the thread "main". D. Execution completes normally, and Ready to use is printed to the console. E. The code fails to compile because a throws keyword is required. Correct Answer: C Section: (none) Explanation Explanation/Reference: QUESTION 42 Given: What is the result? A. Option A B. Option B C. Option C D. Option D Correct Answer: B
Image of page 42
Section: (none) Explanation Explanation/Reference: QUESTION 43 Given the code fragments:
Image of page 43

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

Which code fragment, when inserted at line n1, enables the code to print Hank? A. checkAge (iList, ( ) -> p. get Age ( ) > 40); B. checkAge(iList, Person p -> p.getAge( ) > 40); C. checkAge (iList, p -> p.getAge ( ) > 40);
Image of page 44
D. checkAge(iList, (Person p) -> { p.getAge() > 40; }); Correct Answer: C Section: (none) Explanation Explanation/Reference: QUESTION 44 Given the code fragment: What is the result? A. A B C B. A B C D E C. A B D E D. Compilation fails. Correct Answer: C Section: (none) Explanation Explanation/Reference: QUESTION 45 Given the code fragment:
Image of page 45

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

What is the result? A. true true B. true false C. false false D. false true Correct Answer: C Section: (none) Explanation Explanation/Reference: QUESTION 46 Given the code fragment: Which code fragment, when inserted at line n1, enables the App class to print Equal?
Image of page 46
A. Option A B. Option B C. Option C D. Option D Correct Answer: B Section: (none) Explanation Explanation/Reference: QUESTION 47 Given:
Image of page 47

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

What is the result? A. Option A B. Option B C. Option C
Image of page 48
D. Option D Correct Answer: B Section: (none) Explanation Explanation/Reference: QUESTION 48 Given the code fragment: What is the result? A. Element 0 Element 1 B. Null element 0 Null element 1 C. Null Null D. A NullPointerException is thrown at runtime. Correct Answer: D Section: (none) Explanation Explanation/Reference: QUESTION 49
Image of page 49

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

Given: What is the result? A. 10:20 B. 0:20 C. Compilation fails at line n1 D. Compilation fails at line n2 Correct Answer: D Section: (none)
Image of page 50
Explanation Explanation/Reference: QUESTION 50 Given the definitions of the MyString class and the Test class: What is the result?
Image of page 51

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 51 Given the code fragment: Which three lines fail to compile?
Image of page 52
Image of page 53
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