Java, which version to learn? [closed]
I wanna start learning Java. I have a book that covers Java 5.0, but i hear that in few days there'll be a new version of Java, so i wanna ask if it will be better to wait for some new book, or to start with 5.0?
thanks
The differences between versions 5 and 6 won't matter to someone who knows nothing about Java. Post the book you have in mind before you buy it, but as long as the book treats JDK 5 or higher you'll be fine.
major language changes came in Java5 (Generics, autobox/unbox), Java6 is pretty much identical. Java7 has a few language changes (you can switch on String type and some other small differences), but basically Java5 is pretty much what Java will look like the next few years so you should be OK with that book.
The linguistic differences between Java 5 and Java 6 are small. (In fact, you have to look hard to see any.)
Java 7 is going to have more visible language changes, but
- they are merely "convenience" changes,
- they don't affect the core of the language, and
- they shouldn't change how you would design and implement Java code.
My advice is that there's no need to wait until textbooks are revised for Java 7. If you learn Java 5/6 thoroughly from a decent textbook (and consolidate that knowledge by writing lots of code), you'll be able to transition to Java 7 with minimum effort. (FWIW, I haven't used a Java >>language<< textbook since JDK 1.1 ...)
精彩评论