File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes K & B sample two - posted Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "K & B sample two - posted" Watch "K & B sample two - posted" New topic

K & B sample two - posted

Bert Bates

Joined: Oct 14, 2002
Posts: 8898
Okay, it was a looooong week :roll:

In any case, the book is shipping, and here's a sample to keep you busy.

Sample one has been up for over a month, and we just put sample two up today. The sample three button doesn't work, so please don't send us a bug report on the samplethree button

Sample two is, again, some cut and paste magic, so don't worry about weird headings or page number issues. It contains the SCJP 5 book's section on Serialization, then it contains a bunch of mock questions on serialization, file i/o, strings, formatting, and regex. So, this sample is a bit of a grab bag.

We'd like to know what you think!

Good luck in your studies.

[ December 23, 2005: Message edited by: Bert Bates ]

Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Vincent Brabant
Ranch Hand

Joined: Nov 01, 2004
Posts: 33
I read it and noted some mistakes

page 454: �2 would be

... (unless you implement readObject) ...
in place of
... (unless you implement defaultReadObject()) ...

page 454: exam watch
If DataInputStream and DateOutputStream are nos in the exam, why not remove it from the objectives ? If people are not buying your book, they will use their to study something that is not in the exam.

page 459: selftest3
It's not indicated that IOException are catched somewhere. So, answer F could be considered as valid if we imagine that no catching occurs in the code.
Would be nicer to have
"Given that bw is a reference to ... and that all exception are catched"

page 465, first line

from a directory that has two subdirectories, "dir1" and "dir2"
in place of
from a directory that has two subdirectories, "dir1" and "dir1"

(last dir1 --> dir2)

page 468: selftest1
there are no explanation why start() return also 6 when length of String is 6 (means 0 to 5).


Vincent Brabant<br /><a href="" target="_blank" rel="nofollow"></a>
Bert Bates

Joined: Oct 14, 2002
Posts: 8898
Ouch Vincent!

You have the distinction of finding the first, official, published errata for the book!

Ah well, it was inevitable. :roll:

As far as the Sun objectives are concerned, we're not in charge of that, it's really out of our control! So we hoped that our note would at least help some of the people! Don't you think?

- Bert
Chiok Jarse

Joined: Dec 29, 2005
Posts: 13
Thanks for the samples!

The only erratum I noticed was in the first sample. On page 77,
int i = 5;

Should be:
int i = 5;

Or the "int i = 5;" should be removed.
[ December 29, 2005: Message edited by: Jamie Mellway ]
I agree. Here's the link:
subject: K & B sample two - posted
It's not a secret anymore!