• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Errata for Finegan/Liguori OCA Java SE8? Also, CD does not work?

 
Juha Teuvonnen
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I Bought the Oracle Press "OCA Java SE 8 Programmer 1 Study Guide" (Exam 1Z0-808).
I can't seem to find any errata for the book that I need badly. To add insult to injury, the CD doesn't seem to work at all (tried it on 5 machines: Windows 8 and 10, two Macs and one Ubuntu).


I am having a devil of a time compiling the first example from the book:


The first bug I am running into is seemingly this:
TestClass.java:14: error: cannot find symbol
      Files.createDirectories(Paths.get("logs"));
                              ^
  symbol:   variable Paths
  location: class TestClass
TestClass.java:14: error: cannot find symbol
      Files.createDirectories(Paths.get("logs"));
      ^
  symbol:   variable Files
  location: class TestClass

I can't seem to find classes named "Files" and "Paths" in java.io package, as the source code from the books seems to suggest. I did find them in java.nio. package and got past that error.

To my dismay I am now getting "cannot find symbol"  error for "DateFormatter" and DateTime classes. Is the exercise of hunting down the classes in the Oracle docs supposed to be the part of the drill, or is it just sloppy QA work on the part of the authors and publisher?

 
Roel De Nijs
Sheriff
Posts: 10666
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Juha Teuvonnen,

First of all, a warm welcome to CodeRanch!

Juha Teuvonnen wrote:I Bought the Oracle Press "OCA Java SE 8 Programmer 1 Study Guide" (Exam 1Z0-808).
I can't seem to find any errata for the book that I need badly.

Each certification study guide should have a (publicly available) errata overview, because how hard the authors try, each study guide will have some errata items. Not having such an errata overview would be a reason for me to purchase another study guide. So I would suggest purchasing another study guide to use as a primary (or complementary) resource. This way you are guaranteed not to learn incorrect things.

To my dismay I am now getting "cannot find symbol"  error for "DateFormatter" and DateTime classes. Is the exercise of hunting down the classes in the Oracle docs supposed to be the part of the drill, or is it just sloppy QA work on the part of the authors and publisher?

I don't have the study guide myself, but if the code snippet you have posted is actually in the study guide, that's a true disgrace! Not only are some of the imports incorrect (as you already have figured out), also some of the classes are incorrect as well (e.g. DateTime is not in the Java API, it should be LocalDateTime).

Try this code snippet. It should compile successfully and use classes from the Java 8 API.

Hope it helps!
Kind regards,
Roel

PS. I also don't understand why it uses classes from the Java Util Logging API. That's definitely not on the OCAJP8 certification exam.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel De Nijs wrote:I don't have the study guide myself, but if the code snippet you have posted is actually in the study guide, that's a true disgrace! Not only are some of the imports incorrect (as you already have figured out), also some of the classes are incorrect as well (e.g. DateTime is not in the Java API, it should be LocalDateTime)

I don't have that study guide either. But I checked on Amazon preview (this code is on pages 9 and 10) and also the free sample chapter 1. That code is in fact in there.

I also agree about the importance of posting errata. *Especially* for a cert book. This book is from the same publisher as K&B. And K&B hosts their errata here. I don't see any errata on the publisher's site.
 
Juha Teuvonnen
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much Roel and Jeanne. I really appreciate your help on this. I guess I will adopt a much more cavalier approach to the code in that particular study guide. I fully expect a semicolon missing here and there or a curly brace facing the wrong way. Typos happen. I just didn't expect the class names to be wrong and assumed that the authors were on to something I didn't understand. I ended up looking up all the requisite classes in the documentation and fixing all the bugs myself. I guess it was a good exercise, albeit not the one that the authors intended.

P.S. I was able to read the CD on an ancient laptop with Windows XP that I use for automotive diagnostics (my hobby). That's the only computer that seems capable of doing it, go figure!

P.P.S. IMHO the Sybex study guide is better written, and much more thoroughly QA'd. I bought both, so I can compare.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Juha Teuvonnen wrote:P.P.S. IMHO the Sybex study guide is better written, and much more thoroughly QA'd. I bought both, so I can compare.

Plus we (Sybex) disclose all the errata. So you aren't left wondering if something is a typo.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic