I am wanting to learn Java, particularly for Android development since I am getting a new tablet but also for many of the other things Java can do (Struts, network development, JWebSockets, and others). I am a fairly experienced developer with PHP, Javascript and .NET, mostly (I would say I am about an intermediate coder).
My issue is that I prefer to learn from books since I feel they give a more all-inclusive learning experience than trying to patch together a whole bunch of tutorials. I also just enjoy reading technical books! However, I have found a book that looks good to me at a discount book store near me called “Learning Java, 3rd Ed.” by Niemeyer and Knudsen. It looks like exactly what I am looking for since it doesn’t seem to be a beginner book that spends 500+ pages explaining OO, variables and methods. But it is for Java SE 5!
So now there is a Java SE 6 version, SE 7 and I think there is even a beta of SE 8. How far behind would it put me to learn the Java class library (and generally how to program Java) of Java SE 5?
I found this question: How difficult is it to learn Java SE 6 from J2SE 5.0? but it seems that it was only referring to Java SE 5 vs. SE 6. But now there will soon be 2 more versions beyond that. I have also looked over feature lists of new versions, but without knowing the language better, I can’t really tell how important the new versions are, or if they are mostly syntactic sugar. At the best, will I just need to maybe read some tutorials for upgrading developers, or at worst, would my SE 5 code break in SE 6, 7 or 8? Any and all help is appreciated!
For what it’s worth, Java 7 was only recently released, and I wouldn’t expect Java 8 to be released anytime soon.
From a Java versions perspective, the release from Java 1.4 to Java 5 was the biggest change, in my opinion – enough that Sun started referring to Java 1.5 as “Java 5”. This was the version that introduced new core features such as Generics, Annotations, etc. The jump from Java 5 onward won’t be as big of a change compared to the earlier revisions, in comparison; mostly Java 6 & 7 add to the standard libraries, as well as some new syntactic sugar such as try-with-resources.
Either way, I’d say go for the book. Java 5 is a good start, and once you understand the language you can move on to the new features that Java 6 & 7 provide, such as java.util.concurrency, nio, blah, blah, blah…