« You and your users: casual dating or marriage? | Main | Who's in charge--you or your brain? »

Code for Head First Java second edition

Hfj2
If you want to download the code JAR for the second edition of HF Java 2, I've posted it here (on the wickedlysmart site). But thanks to John Croucher for pointing out that the first edition code is also still available here.

I'm really sorry about the confusion--we thought O'Reilly was managing the code and they thought we were, so we ended up with hidden links to both versions of the code. The errata page for the second edition is on the O'Reilly site.

Which version of the code do you need? If you're using Java 5.0 (aka Tiger aka Java 1.5), you need the second edition code, regardless of which version of the book you're using. If you're using Java 1.4 or 1.3, you need the first edition code, even if you're using the second edition of the book. However, unless you're using a Macintosh, you should be using Java 5.0 if you have the second edition of the book! On the Mac, the only way to get Java 5.0 (legally ; ) is to either join the Apple Developer Program (the free membership level doesn't work), and get the beta version of Mac OSX 10.4 (also known as Tiger), or wait for the Tiger OS to be released. You can preorder it here from Amazon, and it should be out in the next couple of months.

I'll have to shoot you if I tell you that I've been using the beta version of OSX 10.4, which means the beta version of Java 5.0 (so, Tiger on Tiger), and it's been a ton of fun.

Warning: if you're using Java 5.0 but have the first edition of the book, most of the code will still work (although the code that uses an ArrayList will give you compiler warnings, but will still run). But... the BeatBox code won't loop! Sun made a few little changes to the sound API, and I had to modify the code to loop. If you're familiar with that code, in the first edition we do a hack to cause the sequence to loop, by listening for a meta event and basically restarting the sequencer each time. But in Java 5.0, looping is set through the API. But since we upgraded the code to use the looping, that broke the way we handled the tempo change. In the old code, tempo changes you make at runtime are picked up each time the sequencer is restarted, but since the sequencer no longer restarts in the new code, we had to modify the tempo handling. The changes are very simple, but without them, the BeatBox will play once and just stop until you rerun the program!

And while we're here... we're still about six weeks away from finishing the update to our Sun Certified Java Programmer exam certification book, to match the upcoming Tiger/Java 5.0 version of the exam. Oh MAN is the new exam going to be hard, although several of the more challenging questions were lost during beta. During the beta test, if even the experts get a particular question wrong, we assume that something is ambiguous or particularly evil about the question, and it won't appear in the publicly released exam.

You still have a chance to take the current (Java 1.4) exam for probably the next four months at least, if you choose. Sometime later there will also be an upgrade exam for those who are already SCJP certified, on an older version, and want to bring their certification up to the new Java 5.0 version. That exam will have roughly half the number of questions as the full exam, and focus mostly on the newer objectives, although you will get at least a few questions from other objectives. We're working on the upgrade exam objectives now, and those should be posted fairly soon.

Good luck!

Posted by Kathy on April 9, 2005 | Permalink

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d83451b44369e200d8342873d253ef

Listed below are links to weblogs that reference Code for Head First Java second edition:

Comments

The comments to this entry are closed.