Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Errata for OCP: Oracle Certified Professional Java SE 8 Programmer II - Appendices  RSS feed

 
Ranch Hand
Posts: 238
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Appendix B, page 585: there's a typo in the sample question.

9. Which of the three following statements about interfaces are true?


should be:

9. Which three following statements about interfaces are true?

 
author & internet detective
Posts: 39129
723
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's not a typo nor is it an errata. There are many correct way of saying the same thing in English. The sentence sounds fine both ways.

It might not be textbook correct grammar, but it sounds right to be as a native English speaker and that's the standard most people use. And it is the standard the exam uses.
 
T Vergilio
Ranch Hand
Posts: 238
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeanne,

There are more than 3 statements and only 3 are correct.

So "which three of the following statements" would be the most accurate.
 
author
Posts: 4099
21
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey T, there's a difference between "Errata" and "grammatical issues". You could spend hours debating some of the finer points of the latter issue.

Errata is something that is factually incorrect. For example, accidentally calling an interface a class, or visa versa. Those are the kinds of issues that make it into our Errata list. We appreciate your help with the other issues, but in this case we do not consider this Errata.
 
Jeanne Boyarsky
author & internet detective
Posts: 39129
723
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

T Vergilio wrote:Hi Jeanne,

There are more than 3 statements and only 3 are correct.

So "which three of the following statements" would be the most accurate.


Ah. It still understandable, so I'll note it on our private list.
 
T Vergilio
Ranch Hand
Posts: 238
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On page 604, just before the Formatting heading:

Once you have the DateFormat instance, you can call format() to turn a number into a String and parse() to turn a String into a number.



should be:

Once you have the DateFormat instance, you can call format() to turn a Date into a String and parse() to turn a String into a Date.


 
T Vergilio
Ranch Hand
Posts: 238
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On page 605, under the output:

Also note that the time defaults to midnight since we never specified a time.



It didn't default to midnight, it defaulted to 12:00:00 AM in the code sample.
 
T Vergilio
Ranch Hand
Posts: 238
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still on page 605,

Let's try a similar format with the same date but a different locale.



The output doesn't show the same date.
 
T Vergilio
Ranch Hand
Posts: 238
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On page 610, just above Using a ReentrantLock

Refer to Table 7.3 in Chapter 7 for a full list of values.



The list of TimeUnit values is on table 7.4.
 
T Vergilio
Ranch Hand
Posts: 238
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still on page 610, first sentence in Using a ReentrantLock:

The ReentrantLock, which we have been using in all of our lock examples up until now, is simple monitor lock that implements (...)



should be

The ReentrantLock, which we have been using in all of our lock examples up until now, is a simple monitor lock that implements (...)

 
T Vergilio
Ranch Hand
Posts: 238
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On page 619, first paragraph under Walking a Directory Tree with FileVisitor:

This is useful for recursive tasks, such as deleting all of the files contained with a directory tree or searching a directory tree for a particular type of file.


should be

This is useful for recursive tasks, such as deleting all of the files contained within a directory tree or searching a directory tree for a particular type of file.

 
T Vergilio
Ranch Hand
Posts: 238
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On page 621, last paragraph:

To use the SimpleFileVisitor class, you simply extend it and overwrite the methods that you want to implement, relying on the default implementation for any methods that you do not overwrite.



Should it not be override?

To use the SimpleFileVisitor class, you simply extend it and override the methods that you want to implement, relying on the default implementation for any methods that you do not override.

 
T Vergilio
Ranch Hand
Posts: 238
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On page 632, the output doesn't correspond to what the code is doing.

The code to print the output is:

Now path.getFileName() returns only the farthest element from the root in the directory hierarchy, not the full absolute path.

Even if we were to change the code above to:

it still wouldn't print the full path from the root, as the path in question is relative to the directories being watched. In this specific example, the directories being watched are "/user/home/zoo/data" and "/user/home/zoo/log", so the paths returned by watchEvent.context() would be relative to these, i.e. NewFile.txt, ZooData.txt, etc.

From the WatchEvent API:

T context()
Returns the context for the event.
In the case of ENTRY_CREATE, ENTRY_DELETE, and ENTRY_MODIFY events the context is a Path that is the relative path between the directory registered with the watch service, and the entry that is created, deleted, or modified.

 
Jeanne Boyarsky
author & internet detective
Posts: 39129
723
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
page 604 - agreed and logged
page 605 - 12:00 am is midnight. 12:00 pm is noon. Making the text correct.
page 605 - agreed that 1984 and 2015 are clearly not in the same year! Logged.
page 610 - agreed and logged for both
page 619 - agreed and logged for both
page 621 - yes it should! logged
page 631 - you are correct. It should print path.toAbsolutePath(). We wanted to output the full path to make it easier to follow
 
T Vergilio
Ranch Hand
Posts: 238
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for checking these.

Jeanne Boyarsky wrote:
page 605 - 12:00 am is midnight. 12:00 pm is noon. Making the text correct.


You're right. My locale prints 00:00, so I had a bit of a brain lapse there Thanks for clarifying!
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!