Angelika Langer - Training & Consulting

 
HOME | SEMINARS | TALKS | ARTICLES | BOOKS | LINKS | IOSTREAMS | GENERICS | ABOUT | NEWSLETTER | CONTACT | SITEMAP
Java Generics In-Depth

Course Curriculum Angelika LangerCourse Curriculum Angelika Langer  
HOME

SEMINARS
  GENERAL INFO
  SCHEDULE
  REGISTRATION
  
  JAVA
    EFFECTIVE JAVA
    CONCURRENCY
    PERFORMANCE
    JAVA 5.0 
    GENERICS
    5.0 OVERVIEW 
    JAVA 1.3 => 5.0
    JAVA FOR C++
    JAVA INTRO

  C++
    RELIABLE C++
    EFFECTIVE STL
    TEMPLATES
    EXCEPTIONS
    IOSTREAMS
    C++ FOR C
    C++ FOR JAVA
    C++ INTRO   
 

TALKS
ARTICLES 
BOOKS 
LINKS 
IOSTREAMS 
GENERICS 
ABOUT 
NEWSLETTER 
CONTACT 
SITEMAP 
Java Generics In-Depth
COURSE DESCRIPTION

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.

 


 
COURSE CONTENT


 
Fundamentals of Java Generics
  • What are Java generics?
  • What is the primary purpose of Java generics?
  • What is the benefit of using Java generics?
  • What does type-safety mean?


Language Features of Java Generics

  • Parameterized Types
    • Concrete Instantiations
    • Raw Types
    • Wildcard Instantiations
  • Parameterized Methods
  • Type Parameters
    • Type Parameter Bounds
    • Usage
    • Scope
    • Static Context
  • Type Arguments
    • Wildcards
    • Wildcard Bounds
Practicalities - Programming With Java Generics
  • Using Parameterized Types and Methods
  • Coping With Legacy
  • Defining Parameterized Types and Methods
  • Designing Generic Methods
  • Working With Parameterized Interfaces
  • Implementing Infrastructure Methods
  • Using Runtime Type Information
Technicalities - Under the Hood of the Compiler
  • Compiler Messages
  • Type Erasure
  • Type System
  • Exception Handling
  • Static Context
  • Type Argument Inference
  • Wilcard Capture
  • Wildcard Instantiations
  • Cast and instanceof
  • Overriding of Generic Methods
  • Generics and Reflection
     
 
FURTHER READING

 
To get an impression of some topics covered in this course check out the sample reading: 
 
 
Language Features of Java Generics
Wildcard Instantiations of Parameterized Types
Articles published in Java Pro Online
Effective Java Programming
Type Erasure und das Java Typsystem
Articles published in JavaMagazin
(only available in German)
Java Generics FAQ
Freuquently Asked Questions related to Java Generics

 

 
 
TRAINING LOCATIONS

Open Enrollment
Public courses are conducted in collaboration with partner companies worldwide. Presentation language is English or German, depending on the location. For further information go to GENERAL INFO.
On-Site Training
Courses can be held at your company site. Duration and content will be tailored to your specific needs and prerequisites. Presentation language is English or German.  For further information go to GENERAL INFO.
For information regarding training locations and the current schedule of public courses go to SCHEDULE. For further information or enrollment send me EMAIL or use the REGISTRATION form.
Schedule
To check for availability, price and other details send me EMAIL or use the REGISTRATION form.

 
© Copyright 1995-2006 by Angelika Langer.  All Rights Reserved.    URL: < http://www.AngelikaLanger.com/Courses/JavaGenerics.html  last update: 5 Jul 2006