How do I learn Java5 or Java6?

Asked by At

I'm a very experienced Java programmer who has spent my entire time working with Java 1.4 and earlier. Where can I find a quick reference that will give me everything I need to know about the new features in Java5 and later in a quick reference?

6 Answers

bpapa On

Java 5 new features

Java 6 new features

The real meat is in Java 5. Generics, Autoboxing, Annotations.

Community On

I can recommend Bruce Eckel's "Thinking in Java" 4th edition. He goes over a bunch of basic stuff you can skip, but his treatment of new 1.5 features is very thorough, especially the chapter on generics. And it is a good Java reference to own.

Trausti Thor On

Dietel : How to program Java

This book is highly recommended. Teaches everything, does it well. Starts with simple Hello World and ends up in you writing your own BASIC compiler. handles databases as well. Does everything, uml, design. Just can't say enough about it.

And it is also beautiful book, I mean in design and color and it is not dry.

Bill Michell On

I would thoroughly recommend Java Concurrency in Practice by Brian Goetz, Tim Peierls, Joshua Bloch, and Joseph Bowbeer. It focusses solely on good concurrency coding, but includes excellent guidance on the new concurrency features in the Java 5 and 6 libraries.

Of course, it is no help at all on the other features, but if you ever deal with threads (and if you have a GUI, then you have threads), then this book is indispensable.

ajithparamban On

Java 5 introduced several major updates, such as language improvements (i.e. Annotations, Generics, Autoboxing, and improved syntax for looping) among many others. Annotation is a mechanism for tagging classes with metadata so that, they can be used by metadata-aware programs. Generics is a mechanism of specifying types for objects belonging to collections, such as Arraylists, so that type safety is guaranteed at compile time. Autoboxing allows the automatic conversions between primitive types (e.g. int) and wrapper types (e.g. Integer). Improved syntax for looping includes the enhancements for each loop for going through the items of array or collections comparatively easily.

Java 6 focuses on new specifications and APIs including XML, Web Services, JDBC version 4.0, programming based on Annotations, API’s for Java compiler and Application client GUI.With new compiler API added with Java 6, the java compiler can now receive and/or send output to an abstraction of the file system (programs can specify/process compiler output). Furthermore, Java 6 added enhancements to the applications GUI capabilities in AWT (faster splash screens and support for system tray) and SWING (better drag-and-drop, support for customizing layouts, multithreading enhancements and ability to write GIF images).