Angelika Langer - Training & Consulting
HOME | COURSES | TALKS | ARTICLES | GENERICS | LAMBDAS | IOSTREAMS | ABOUT | CONTACT | Twitter | Lanyrd | Linkedin
Course Curriculum Angelika LangerCourse Curriculum Angelika Langer  
HOME

  GENERAL INFO
  SCHEDULE
  REGISTRATION
  
  JAVA
    EFFECTIVE JAVA
    CONCURRENCY
    PERFORMANCE
    LAMBDAS
    JAVA AFTER EIGHT
    MODULE SYSTEM
    GC TUNING
    MEMORY MODEL 
    JAVA INTRO

  C++
    RELIABLE C++
    EFFECTIVE STL
    TEMPLATES
    IOSTREAMS
    C++ INTRO   
 

GENERICS 
LAMBDAS 
IOSTREAMS 
ABOUT 
CONTACT 
Java Generics In-Depth

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 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  [ ].

 


 
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
Frequently 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-2014 by Angelika Langer.  All Rights Reserved.    URL: < http://www.AngelikaLanger.com/Courses/JavaGenerics.html  last update: 19 Mar 2014