The 5.0 release of the Java Standard Edition (J2SE) adds 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.
Java Generics
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.
Concurrency Utilities
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,
and varargs. Another novelty in Java 5.0 is the meta-data facility that
allows definition and use of program annotations. |
|
Prerequisite Courses
and Skills:
|
Working knowledge of Java; in-depth experience
with Java not required. |
|
Duration:
|
2 days |
|
Exercises:
|
Workshops and hands-on labs |
This is a course for Java programmers who want to explore new language
features added to the Java programming language with release 5.0 of the
J2SE. The course is designed to build on existing expertise as Java programmers
and take your skills one step further. Prerequisite for these seminars
is at least 1 year of experience with Java or equivalent knowledge.
PERFORMANCE
OBJECTIVES
|
Learn how to use generics effectively |
|
Know what to expect of Java generics |
|
Know how get the most out of the new concurrency utilities |
|
Understand best-practice Java idioms |
BUSINESS OBJECTIVES
|
Equip your software professionals with industrial-strength Java skills |
|
Make your Java software more reliable |
|
Get the most out of Java |
The course is designed by Klaus Kreft & Angelika
Langer and backed by years of experience in teaching Java and C++
related topics and more than a decade of real-world experience in industrial
software development both in C++ and Java.
Angelika Langer is a freelance trainer/mentor
in the area of object-oriented software development in C++ and Java. She
is a recognized author and speaker at conferences worldwide and author
of the
Java Generics FAQ
.
Klaus Kreft is a senior consultant for more than
20 years and has served as the lead architect on several successful industry
projects. He has been working in C++ for many year and works in Java since
1995. He is a regular speaker at OO conferences in Germany.
Together they wrote columns for C+ Report and
C/C++ Users Journal, are authors of the book "Standard C++
IOStreams and Locales". They publish articles on C++ and Java topics
in various computer magazines worldwide, including the column "Effective
Java" in the German JavaSpektrum magazine.
|