tags:

views:

126

answers:

5

Having searched for books for learning Java here on StackOverflow, I decided to pick up a copy of Head First Java from a local library. Sadly, only the first edition from 2005 is available (the second edition came out only this year). I never did any Java before, so excuse me if the question is silly, but is the first edition of the book still good today? Will the examples from the book work in the current version of Java?

+1  A: 

Java has not changed that much since 2005. That edition should be just fine. If any API issues do come up, all of the most up to date APIs are on the Java website. Good luck learning Java!

Poindexter
+2  A: 

Because Java has a relatively strong (some would say too strong) focus on backwards compatibility, chances are good that everything you do will still work in a newer version of Java. But you may be missing out on topics that the newer editions of Java have introduced. For example, generics were introduced in 1.5, which came out around 2005, so the first edition might not talk about that.

John Feminella
+1  A: 

The examples in the book will almost certainly work, because the Java language and libraries have retained almost 100% backward compatibility. However, the Java language changed quite a lot in version 1.5 (confusingly, also known as Java 5.0), so you should make sure that any Java book covers these changes.

I've been impressed with the Head First series, so assuming it does cover Java 1.5/5.0, it's probably a great place to start.

Don
+2  A: 

If you're reading 'Head First', you're probably a beginner. If you're a beginner, there's lots and lots of Java you need to learn before it becomes relevant that some of the older API classes and methods have been superseded by newer stuff.

The "older stuff" never really goes away, and practically all of it still works; there are still (e.g.) people using class Vector in their programs, and those programs still work.

Consider also that people who have been "doing" Java for years are also needing pick up some new stuff once in a while... if you get a hot-off-the-press book there will be less of this effect, but not really enough to matter in the long run.

HFJ is a good book, stop agonizing about it and go for it!

Carl Smotricz
A: 

I believe that edition covers Java 1.4. Java 5 & 6 (equivalent to 1.5 and 1.6) have come out since then but the new versions mainly build on 1.4 so what you learn will certainly still be useful. When you're comfortable with the content of that edition, I would recommend moving on to the added features of 5 and 6.

You may even have an easier time of learning the 5 and 6 features if you study the 1.4 as your first introduction to Java. The main edition of 5 is something called Generics which gives you more power in using types but the syntax can be confusing.

Good luck and good choice with the Head First books, they're pretty great ways of learning.

MattGrommes