Java OCA/OCP 8 Programmer Practice Tests

pt-cover

In late 2016, Scott Selikoff and Jeanne Boyarsky were approached by Wiley Publishing to create a brand new book of practice exam questions for the Oracle Certified Associate (OCA) and Oracle Certified Professional (OCP), Java SE 8 Programmer, exams. The new book, OCA / OCP Java SE 8 Programmer Practice Tests, serves as a worthwhile addition to our existing OCA 8 and OCP 8 book lineup, for those who have read the material thoroughly, but desire additional help practicing for the exams.

The book is divided into two parts, one half for the OCA 8 exam and the other half for the OCP 8 exam, with each chapter corresponding to a different set of Oracle objectives. The new book includes over 1,000+ hand-crafted and peer reviewed practice questions, including two full mock exams. With our two Study Guides and or

With our new Practice Test book, we are confident our readers have everything they need to pass both exams! Oh, and if you haven’t purchased either of our Study Guides but are interested in taking the exams, Wiley has released a boxed set OCA / OCP Certification Kit, due in large part to how the book was been received by our readers.

OCA / OCP Java SE 8 Programmer Practice Tests is now available and shipping via Amazon!

Where to buy it:

Length/score/changes to the objectives since the exam was launched

Oracle has a tendency to change this information from time to time. See the following page for your exam:

Errata

The table is sortable so you can see focus on the errata by criticality, chapter or see the ones added since you last checked. To report a potential error, please create a thread at http://www.coderanch.com/forums/f-24/java-programmer-SCJP. Be sure to include “Sybex” and the chapter and/or page number in the subject. Note that we’ve removed online only errata (conversion errors) from this table after they were fixed. Errata in the book will remain posted of course!

Online materials:

Page Chapter/ Question # Error Type of error Reported by/via Confirmed on Reported to Wiley Listed on Wiley’s errata Fixed in online exam software
n/a Ch 1 #4 This question is missing all the words in code font. It should say “Given that a Date class exists in both the java.util and java.sql packages, what is the result of compiling the following class?” Also, the table shouldn’t be in this question. Conversion error Jeanne Boyarsky 2017-04-10 2017-04-10 n/a – correct in book Pending
10 Ch 1 #29 theInput[2] should be deerParams[2] Typo Noorul Hameed 2017-05-17 2017-05-17 Pending Pending
30 Ch 2 #47 Answers A & B should say “static TennisBall” rather than “TennisBall static”. This does not affect the correct answer. Typo Juerg Bauman 2017-12-02 n/a n/a n/a
30 Ch 2 #48 car.play(); should be car.play(); car = null; Typo Pawel Pusz 2018-07-28 n/a n/a n/a
35 Ch 3 #9 “1: package exam; public class Election {” should be one line. Formatting Jeanne Boyarsky 2017-04-10 2017-04-10 Pending Pending
36 Ch 3 #36 Option D is incorrect if you have extra knowledge. So you give yourself credit if you wanted to choose “none of the above” Formatting Nurettin Armutcu 2017-10-28 n/a n/a n/a
n/a Ch 4 #32 “java EchoFirst” should be java unix.EchoFirst” Conversion error Jeanne Boyarsky 2017-04-10 2017-04-10 n/a – correct in book Pending
n/a Ch 5 #14 The incorrect question is online Conversion error Charles O’Leary 2017-05-28 2017-05-28 n/a – correct in book Pending
82 Ch 6 #8 “Long” should be “long” in Option B Typo Nurettin Armutcu 2017-10-28 2017-10-28 n/a n/a
online only Ch 7 #10 Option D should be “A checked exception thrown by a method in the child class must be the same or narrower than the exception thrown by the method in the parent class.” This is correct in the printed book Translation error Jens van Groeningen 2021-02-23 2021-02-23 n/a n/a
102 Ch 7 #14 main() should be main(String[] args) Typo Nurettin Armutcu 2017-10-28 2017-10-28 n/a n/a
111 Ch 7 #40 Options A/B/C should be 2.0/4.0/8.0 Typo Scott Selikoff 2020-06-14 n/a n/a n/a
113 Ch 7 #48 “return 12” should be “return null” Question unanswerable Jeanne Boyarsky 2017-04-10 2017-04-10 Pending Pending
118 Ch 8 #9 “throw t” should be throw aioobe” Question incorrect Charles O’Leary 2019-12-15 2019-12-15 Pending Pending
online only Ch 8 #32 In Option C “m4” should be “m3” (This is correct in the physical book) Online answer incorrect Noorul Hameed 2017-05-26 2017-05-26 Pending Pending
127 Ch 8 #35 street.toString() + “:” should be street.toString() + “-“ Question incorrect Noorul Hameed 2017-05-26 2017-05-26 Pending Pending
127 Ch 8 #35 street.toString() + “:” should be street.toString() + “-“ Question incorrect Noorul Hameed 2017-05-26 2017-05-26 Pending Pending
237 Ch 13 #40 (ch 12 online) This question can’t be answered. To fix, change the question to be “Why can’t String::charAt be used as a method reference with a Function. Question incorrect Ilkay Polat 2017-06-09 Pending Pending Pending
176 OCA #63 Typo Remove “package unix;” from the question Jens van Groeningen 2021-01-23 Pending Pending Pending
182 OCA #76 Typo LocalDate.of(1, 11) should be LocalDate.of(1, 11, 22) Vlad Alin 2021-12-07 Pending Pending Pending
2023 OCA #34 Error Add “Assume o is never null” to the question Jayme Kirchner 2023-09-09 Pending Pending Pending
online only OCA #79 in Question incorrect Rune Thode 2021-01-23 Pending Pending Pending
237 Ch 13 #40 (ch 12 online) This question can’t be answered. To fix, change the question to be “Why can’t String::charAt be used as a method reference with a Function. Question incorrect Tamas Szekeres 2017-06-09 Pending Pending Pending
304 Ch 18 #10 (ch 17 online) “The absolute is” should be “The absolute path is” Typo Juerg Bauman 2018-05-20 2018-05-20 Pending Pending
329 Ch 19 #28 ! p.isAbsolute() should be p.isAbsolute(). With the typo, give yourself credit if you answered Option D Typo Pallavi Sadit 2017-10-15 Pending Pending Pending
361 Ch 21 #18 (ch 20 online) “select * from cert” should be “select * from books” Typo Juerg Bauman 2018-05-20 2018-05-20 Pending Pending
395 OCP mock #19 Option C should say “map” instead of “mapToInt”. This doesn’t affect the answer to the question. Typo Tamas Szekeres 2017-06-09 Pending Pending Pending
407 OCP mock #44 “updatable” should be “updatable and scrollable” Typo Mushfiq Mammadov 2019-09-21 Pending Pending Pending
429 Ch 1 #21 “yesterday” is static. Not “tomorrow” Typo Vlad Alin 2021-12-07 Pending Pending Pending
431 Ch 1 #39 “Java compiled bytecode file” should be “Java file” Typo Juerg Bauman 2017-11-29 Pending Pending Pending
435 Ch 2 #26 “instance variable” should be “class variable”

Typo Vlad Alin 2021-12-07 Pending Pending Pending
437 Ch 3 #2 “pre-increment” should be “pre-decrement” Typo Vlad Alin 2021-12-07 Pending Pending Pending
449 Ch 5 #16 “11 characters” should be “10 characters” Typo Vlad Alin 2021-12-07 Pending Pending Pending
online only Ch 4 #16 “third element” should be “second element” Question incorrect Rune Thode 2021-01-23 Pending Pending Pending
450 Ch 5 #31 “decrements i i” should be “decrements i” Typo Juerg Bauman 2017-12-13 2017-12-13 Pending Pending
452 Ch 6 #4 The explanation should end with “method doesn’t compile.” rather than “method throws an exception at runtime.” Incorrect Fact Juerg Bauman 2018-05-20 2018-05-20 Pending Pending
453 Ch 6 #8 “Long” should be “long” Typo Nurettin Armutcu 2017-10-28 2017-10-28 n/a n/a
453 Ch 6 #9 Ignore the explanation about option D. There are some edge cases” Typo Zoufar Bigloff 2022-01-29 2022-01-29 n/a n/a
456 Ch 6 #32 “two constructors and one method” should be “two methods and one constructor” Typo Juerg Bauman 2017-12-13 2017-12-13 Pending Pending
457 Ch 6 #36 The answer is incorrect. It should be B, not C. final protected int does compile. Incorrect answer Stefan Banu 2017-08-09 Pending Pending Pending
462 Ch 7 #28 The second sentence should say covariant return types Typo Vlad Alin 2021-12-07 Pending Pending Pending
463 Ch 7 #40 2 should be 2.0 Typo Scott Selikoff 2020-06-14 n/a n/a n/a
469 Ch 7 #5 “Canine cannot be returned as an instance of Class because it does not inherit Class” should be “Class cannot be returned as an instance of Canine because Canine does not inherit Class” Description incorrect Charles O’Leary 2019-12-15 2019-12-15 Pending Pending
469 Ch 8 #32 The last sentence (about overriding) should be removed Incorrect statement Felipe Motta 2021-02-14 2021-02-14 Pending Pending
470 Ch 8 #40 In the answer “CastClassException” should be “ClassCastException” Typo Noorul Hameed 2017-05-26 2017-05-26 Pending Pending
475 Ch 9 #30 Typo “second indexed element” should be “element at the index 2” Vlad Alin 2021-12-07 Pending Pending Pending
481 Ch 10 #39 Typo “**/ invalid” has an extra star Vlad Alin 2021-12-07 Pending Pending Pending
482 Ch 10 #48 Typo “message signature” should be “method signature” Vlad Alin 2021-12-07 Pending Pending Pending
483 Ch 10 #54 “Since this reduces the implied visibility of public” should be “Since this reduces the visibility of protected” Typo Vlad Alin 2021-11-07 Pending Pending Pending
478 Ch 10 #11 “chapter” should be “character” Typo Vlad Alin 2021-11-07 Pending Pending Pending
479 Ch 10 #20 “On line 13, result is incremented” should be “On line 14, result is incremented” Typo Vlad Alin 2021-11-07 Pending Pending Pending
483 Ch 10 #29 The comment about the recursive call should be removed from the explanation Typo Vlad Alin 2021-11-07 Pending Pending Pending
483 Ch 12 #14 (ch 11 online) In the explanation, “For these reason” should be “For these reasons” Typo Juerg Bauman 2018-05-20 2018-05-20 Pending Pending
493 Ch 12 #15 (ch 11 online) In the explanation, “enum constructors must be private” should be “enum constructors must not be protected” Incorrect Fact Juerg Bauman 2018-05-20 2018-05-20 Pending Pending
496 Ch 13 #2 (ch 12 online) In the explanation, replace() should be replaceAll() Typo Juerg Bauman 2018-05-20 2018-05-20 Pending Pending
497 Ch 13 #4 (ch 12 online) In the explanation, the comment about Map should say extends, not implements, interface Typo Vlad Alin 2023-06-03 2023-06-03 Pending Pending
504 Ch 14 #22 (ch 13 online) In the explanation, “used for Supplier, not Consumer” should be “used for Consumer, not Supplier” Typo Juerg Bauman 2018-05-20 2018-05-20 Pending Pending
505 Ch 14 #31 (ch 13 online) In the explanation, “It uses the method name accept()” should be “It uses the method name acceptAsDouble()” Typo Juerg Bauman 2018-05-20 2018-05-20 Pending Pending
507 Ch 15 #2 (ch 14 online) In the explanation, none match sees the sixth element, not the first Typo Vlad Alin 2023-07-25 2023-07-25 Pending Pending
518 Ch 17 #10 (ch 13 online) In the explanation, thatOne is after, not before thisOne Typo Vlad Alin 2023-06-03 2023-06-03 Pending Pending
n/a Ch 18 online #36 The incorrect question is online Conversion error Jeanne Boyarsky 2017-05-29 n/a – correct in book Pending Pending
523 Ch 18 #15 (ch 17 online) In the explanation, “because both can be used with a byte array” should be “because a byte array is not optimized for character data” Typo Juerg Bauman 2018-05-20 2018-05-20 Pending Pending
539 Ch 20 #21 (ch 19 online) In the explanation, “The result is it may output” should be “The result may output” Typo Juerg Bauman 2018-05-20 2018-05-20 Pending Pending
540 Ch 20 #33 (ch 19 online) In the explanation, “If push() had been used instead of offer()” should say “If offer() had been used instead of push()” Typo Juerg Bauman 2018-05-20 2018-05-20 Pending Pending
542 Ch 21 #2 (ch 22 online) “iare” should be “are” Typo Juerg Bauman 2018-05-20 2018-05-20 Pending Pending
542 Ch 22 #27 (ch 21 online) “Since all three statements are false, Option D is the answer.” should be “Option B is the answer” Incorrect Explanation Jeanne Boyarsky 2017-04-10 2017-04-10 Pending 2017-05-30
548 Ch 22 #22 (ch 21 online) In the explanation, en_US should be en_AU Typo Vlad Alin 2023-03-04 2023-03-04 Pending Pending
549 Ch 22 #30 (ch 21 online) In the explanation, “Line 10 is incorrect” should be “Line 9 is incorrect” Typo Juerg Bauman 2018-05-20 2018-05-20 Pending Pending
551 OCP mock #4 In the explanation, “Since Object, unlike String, does not have a method equalsIgnoreCase()”, should be “Since equalsIgnoreCase() expects a String instance as a parameter, and not an Object” Explanation incorrect Tamas Szekeres 2017-06-09 Pending Pending Pending
553 OCP mock #18 explanation While the answer is correct, the explanation is not. The String is not in the string pool. However, it is still in memory so still a security issue. Typo Tamas Szekeres 2017-06-10 Pending Pending Pending
557 OCP mock #45 Option A is not correct Error Mushfiq Mammadov 2019-09-21 Pending Pending Pending
557 OCP mock #46 In the explanation, “Option D is the answer” should be “Option E is the answer”. (The actual answer is correct) Typo Jeanne Boyarsky 2017-04-10 2017-04-10 Pending 2017-05-30
559 OCP mock #51 answer The answer is implementation dependent. A/B/E should be the answer. But give yourself credit if you thought it was A/E or B/E. Those answers show you understand the material too. Typo Tamas Szekeres 2017-06-09 Pending Pending Pending
504 OCP Mock #80 In the explanation, “does not is unchecked” should be “does not is checked” Typo Juerg Bauman 2018-05-20 2018-05-20 Pending Pending
563 OCP mock #82 The sentence about how many answers would be correct if the semicolons were changed to colons is incorrect. It would be Option B because box isn’t mentioned in two choices. Error in explanation Tamas Szekeres 2017-06-09 Pending Pending Pending
559 OCP mock #58 The answer is correct, however the explanation is not. Filter() is not redundant. Compiler difference Vlad Alin 2023-06-16 Pending Pending Pending
563 OCP mock #84 If you answered D or E, give yourself credit. Eclipse shows one error and the command line show two Compiler difference Juan Pablo Barale 2018-10-04 Pending Pending Pending

Want to report an errata? Post it at the OCP forum at CodeRanch.