• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Errata for OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide - page 587

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

I believe I've found a typo on page 587 of this book.

The 3rd headline "Marking Answers" should instead read "Marking Questions"

Cheers,
Olivier
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Probably, although you can mark both question and answers (using strike through) so best to keep both in mind when you take the exam!

Either way, glad to see people reading the study tips section, we weren't sure if people were enjoying them!

Fun fact that got dropped from that appendix. The last time I took a certification the power went out for 5 minutes! The test administrator assured me my progress was safe, and it was!
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Olivier,
Welcome to CodeRanch!

I'm glad you are enjoying the book. That's not an errata; it's something that could be clearer. We maintain a private list of those which I've noted this in. The actually errata list is for things that are actually wrong as is.
 
Olivier Chalet
Greenhorn
Posts: 4
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

I've just started reading the book and the study tips section as advised, and although I do have some strong experience with Java and programming language in general, I find this section has some useful tips which I'm sure will come in handy when I take the exam (+1 for the loss of power !)

Thanks for writing this book, it will definitely help me increasing a lot my java knowledge and get the OCP

Cheers,
Olivier
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Olivier,
Glad you are finding it useful. I'd expect many of the tips to be things people know. The catch is that different people know different things!
 
Olivier Chalet
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jeanne, Scott,

I've taken the OCP exam about a couple of weeks ago and passed it with a score of 90+ so I'm quite happy about my result. Thank you for your book as well as the online material, all this has been instrumental to my success.

I may have found additional typos/errors(I'll let you be the judge of that), I've compiled my findings into the table below. There should not be any duplicates with what's currently in the errata. If you have any questions about these please let met know. Also note that I have used JDK 1.8.0_74.

Cheers and thanks again!
Olivier


PageWhereIssue
130Table 3.4"void add (E element)" should be "boolean add (E element)"
157Last sentenceIn a nutshell computeIfPresent() calls the BiFunction if the requested key is found". This is true only if the associated key is not null. I suggest you add "… and the associated key is not null" to this sentence
159Table 3.12The "computeIfAbsent" column for row "null value in map" and "Not null" should say "Set key to mapping function result" rather than "Add key to map with mapping function result as value" because the key already exists in the map (although it has a null value associated)
160Last sentence of 2nd paragraphThe compiler does not raise any error when attempting to remove an item from an unbounded or upper-bounded wildcard list. This actually compiles and runs fine
2182nd sentence"rather than the Collector class" should be "rather than the Collector interface"
265Table 5.8For matching resource bundle "Zoo_fr_FR.java", files keys can also come from Zoo_fr.properties and Zoo.properties (if Zoo_fr.java and Zoo.java are not present). For matching resource bundle "Zoo_fr.properties", keys can also come from Zoo.java (Zoo.java will be chosen in priority over Zoo.priorities if both are present)
3151st paragraphDateTimeParseException is not a checked exception in contrary to IOException and SQLException
340Table 7.3In the description of the second row, "completely" should be replaced by "completed"
352First sentenceIn "results from earlier threads are output before ones that started later", "before" should be replaced by "after"
4083rd sentenceIn "Alternatively, the relative path … from the current working directory to file or directory", "to file or directory" should read "to a file or directory"
425Last sentence of 3rd paragraph"we have access to the all of the methods" should read "we have access to all of the methods"
467relativize() sectionI find that the example for relativize() is confusing when used with files because the relative path from fish.txt to birds.txt should be "./birds.txt" instead of "../birds.txt". According to Java documentation, relativize does the contrary of resolve and resolve considers by default that the path on which it is called is a directory. So presumably, Java makes the same assumption for relativize(), i.e. it considers by default that the path on which it is called is a directory, which explains the ..
4753rd sentence of "Removing a File with delete and deleteIfExists" sectionIn "…, the operation will throw the runtime DirectoryNotEmptyException", "runtime" is not correct as this exception is a checked exception. You may want to remove "the runtime" and maybe add "at runtime" after "DirectoryNotEmptyException" ?
478Last sentence of 4th paragraphIn "For example, some operating systems may not have a notion of user-level permissions, …", "may not" should be replaced by "may"
525In the 2nd sample showing how to retrieve the number of rows of the animal tablers.getInt("count") throws an exception because the "count" column is unknown (it is known as "1" instead)
527Table 10.6getTimeStamp() and java.sql.TimeStamp should respectively read getTimestamp() and java.sql.Timestamp
531Last sentenceThis sentence is confusing, it seems like relative() may return something else than a boolean if the cursor is not pointing to a row with data. This sentence should rather mention that relative() returns false if the cursor is not pointing to a row with data
562Answer to question 3Line w4 does not handle the InterruptedException and ExecutionException that may be thrown by calling result.get() so I would argue that E would be a correct answer. (line w4 would need to be wrapped in a try catch statement)
566Answer to question 12Answer D is also valid. A File object is correctly created on a Windows OS when using // instead of /. Calling the exists() method on this file object does return true if the file exists which proves that it works fine. Although this is a valid answer I think it brings confusion as, as I understand it, it is not something we should consider as a good practive to create a File object.
Mock exam 2Question "What changes need to be made to make the following singleton pattern correctThe exhibitionManager variable should be private instead of public in the code sample (otherwise encapsulation of the singleton variable is not correctly implemented). Alternatively there should be an addition answer in the lines of "Change the access modifier of the exhibitionManager variable from public to private


 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Olivier,
Congrats on your pass and your great score!

130 - Yes. This one was already reported. I'd rather have something reported twice rather than never though so no worries!
157, 159 - Agreed and added. (This section was added the last minute when Oracle added material to the upgrade exam so it was a bit rushed. That's why that table has so many issues)
160 - You're right. Only adding is a problem. Noted. (don't want to overload 'added' by saying added!)
218 - Agreed and added
265 - Agreed and added. That table is wrong. I was thinking about how Zoo_en.java is not included. However, you are correct that the property files are
315 - Yes. This one was already reported. It says "various" for the page number for chapter 6 because this is consistently wrong.
340 - Agreed and added
352 - Agreed and added. As written it is a really complicated way of saying "in order"!
408 - Added. I added it as "to the file" rather than "to a file" for consistency with the rest of the paragraph
425 - Agreed and added
467 - I put this in our private list since confusing != wrong
475 - Agreed. It should just say throw. Readers know that exceptions are thrown at runtime by chapter 9.
478 - No. I think this sentence is accurate both ways. To be really explicit it could say "may or may not" but that feels redundant.
525 - Agreed this is wrong. I prefer the fix "select count(*) as count because readers don't need to know SQL for the exam so they don't need to know what the default column name is.
527 - Agreed
531 - I made a note to consider this for a future version of the book. However, I think it is clear. There are only two possible values for a boolean - true and false. If it doesn't return true, it has to return to false.
562 - No. If code is not in a method, you have to assume that relevant exceptions are handled/thrown. This is true on the exam as well so it is important. Oracle even made this explicit recently with this text on each exam objectives page:

Assume the following:

Missing package and import statements: If sample code do not include package or import statements, and the question does not explicitly refer to these missing statements, then assume that all sample code is in the same package, and import statements exist to support them.
No file or directory path names for classes: If a question does not state the file names or directory locations of classes, then assume one of the following, whichever will enable the code to compile and run:
All classes are in one file
Each class is contained in a separate file, and all files are in one directory
Unintended line breaks: Sample code might have unintended line breaks. If you see a line of code that looks like it has wrapped, and this creates a situation where the wrapping is significant (for example, a quoted String literal has wrapped), assume that the wrapping is an extension of the same line, and the line does not contain a hard carriage return that would cause a compilation failure.
Code fragments: A code fragment is a small section of source code that is presented without its context. Assume that all necessary supporting code exists is present and that the supporting environment fully supports the correct compilation and execution of the code shown and its omitted environment.
Descriptive comments: Take descriptive comments, such as "setter and getters go here," at face value. Assume that correct code exists, compiles, and runs successfully to create the described effect.


566 - Choice D works on Mac too! Definitely a correct answer although it isn't on the exam.
Mock exam question - I agree it should be a private variable. Not sure why an additional answer choice would be needed though.
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Retracted the error for line 265 reported here. Row 1 is in fact correct. For more detail, see this thread
 
Olivier Chalet
Greenhorn
Posts: 4
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Learning everyday about Java, excellent ! Moreover you posted that reply on the day of my birthday, awesome present thanks !  
 
Greenhorn
Posts: 7
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

In errata there is a typo "In the question with the ExibitionManager class," should be "In the question with the ExhibitionManager class,"

Regards,
jml
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Found this missing "h"; it was hiding under the couch . Fixed.
 
Ranch Hand
Posts: 74
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

157 Last sentence
In a nutshell computeIfPresent() calls the BiFunction if the requested key is found". This is true only if the associated key is not null. I suggest you add "… and the associated key is not null" to this sentence


It should be: ... This is true only if the associated value is not null. I suggest you add "… and the associated value is not null"
reply
    Bookmark Topic Watch Topic
  • New Topic