New Features in J2SE 1.5 - Tutorial and Workshop
The upcoming release 5.0 of the Java Standard Edition (J2SE) will add
a number of major and minor new language features and library extensions.
The most significant addition to the Java programming language are generic
types and methods. The most substantial addition to the Java platform
libraries are the new concurrency utilities.
A common misconception regarding generics is its comparison to C++
templates. Many people believe that Java generics are similar to
C++ templates, while in fact both features have barely anything in common:
C++ templates is a Turing complete language – Java generics is
syntactic sugar that elides some casting. Java generics are a pure compile-time
feature that is translated to non-generic Java bytecode, for reasons of
compatibility with previous versions of Java.
In this tutorial, we will take a look into the proposed language feature,
how it will help us improve our programs, how it is supposed to be used
and where its limitations are.
More specifically, we will discuss the additions made to the language
itself (parameterized types and methods as well as covariant return types),
changes to the platform libraries (generic collections and extended reflection)
and various exciting details of generics such as the properties of type
parameters (their bounds and their scope), generic methods and type parameters
inference, and the translation of generics into bytecode.
The Java platform provides basic, low-level primitives for writing
concurrent programs, but they are difficult to use properly. Many programs
become clearer, shorter, faster, easier to write, and more reliable if
higher-level synchronization constructs are used.
A comprehensive library of concurrency utilities has been developed
for inclusion in the 5.0 release of J2SE. This library, known as the util.concurrent
package, contains thread pools, queues, concurrent collections, special-purpose
locks, barriers, and related utilities. The addition to the Java platform
is substantial and will change the way we will implement concurrent Java
applications. This tutorial gives an overview of the new library.
Enums, Autoboxing, Annotations, etc.
Some smaller additions to the programming language comprise syntax
for enumeration types, an enhanced for-loop, static imports, autoboxing,
varargs and program annotations.
intermediate / advanced
90 min - full day
Attendants should be familiar with Java and the core concepts
of concurrent programming in Java.
Zürich, Switzerland, October 2003
Java Users Group
Germany, October 2003
, Bern, Switzerland,
Germany, January 2003
ACCU Conference 2004
Oxford, UK, April 2004
Norway, April 28-30, 2004
, Frankfurt, Germany,
, Oslo, Norway,
Erfurt, Germany, September 2004
Santiago de Compostela, Spain,
If you are interested to hear more about this
and related topics you might want to check out the following seminar or
skim through some further reading: