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 parameterized
types and methods, collectively known as "Java Generics". Generics
are without doubt the most complex language extension that has ever been
added to Java in the past. While the key ideas of parameterized types and
methods are easily understood, the devil lies in the detail.
Programmers with a background from another programming language that
has parameterized types (C#, C++, Ada) will immediately recognize parameterized
types in Java as a familiar concept. On the surface, the parameterized
types in Java look similar to generic types in other language, but their
translation into bytecode is dramatically different. Java generics
are translated by "type erasure", which is a process that eliminates all
type parameters and arguments and represents a parameterized type as though
it were a regular, non-parameterized type in the bytecode. This has
various consequences, some of which are counter-intuitive at first sight.
Using pre-defined parameterized types and methods, like the collection
classes in the JDK, is fairly easy and straight-forward. Challenges
arise, when programmers aim to define parameterized types or methods themselves.
In this case they need a thorough understanding of all generics-related
language features, including wildcards, wildcard capture, type argument
inference, and many more. These advanced features of Java generics
are far from trivial.
This seminar aims to provide a in-depth and complete overview of Java
generics, including all related language featueres. All concepts
explained in the lectures are practiced in hands-on labs. Students
will design and implement APIs using generics, review them, test them,
and refine them, in order to get a feeling for programming and program
design using Java generics.
|
|
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 use Java generics
in practice and need a thorough understanding of this novel language feature
in Java. The courses are designed to build on existing expertise as Java
programmers and take the attendants' skills one step further. Prerequisite
for these seminars is at least 1 year of experience with Java or equivalent
knowledge. Experience with generics are not required.
PERFORMANCE
OBJECTIVES
|
Learn how to use generics effectively |
|
Know what to expect of Java generics |
|
Know how to avoid pitfalls related to generics |
|
Understand best-practice Java idioms related to generics |
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 IT 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 Java since 1995. He is a regular speaker
at IT conferences in Germany.
Together they are authors of the book "Standard
C++ IOStreams and Locales" and the online
Java
Generics FAQ
. They publish articles on C++ and Java topics in
various computer magazines worldwide, including the column "Effective Java"
in the German JavaSpektrum magazine.
|