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 and more than a decade
of practical experience in industrial software development both in C++
and Java.
Angelika Langer
is a freelance trainer/consultant in the area of software
development in C++ and Java, author of language reference material such
as the Java Generics FAQs [
],
the Lambdas/Streams Tutorial & Reference [
],
and countless articles on C++ and Java topics [
].
Klaus Kreft
is a senior consultant for more than 25 years and has served
as the lead architect and performance expert on several successful industry
projects. He has been working in Java since its advent in 1995.
Both are recognized speakers at OO and Java conferences and author of numerous
articles on C++ and Java topics in various computer magazines worldwide.
Together they write a column for the German Java magazine JavaMagazin
[
]
and are authors of the books "Standard C++ IOStreams and Locales"
(2000) [
]
and "Java Core Programmierung" (2011) [
],
the Online FAQ on Java Generics [
],
and the Lambdas/Streams Tutorial & Reference [
].
|