Thursday, February 15, 2007

Java generics - topics

We will learn Java generics on Sunday 18-2-2007. The following topics will be covered.
  • Moving from arrays to raw collections to type safe collections
  • Usage of generics in JDK 1.5
  • An example of using generified lists - UsingGenerifiedCollections.java
  • Using objects whose type is a subtype of the generified type
  • Passing a reference of a generified object to another method - UpcastingOfParameterizedTypes.java
  • Wildcards
  • Upper and lower bounding with wildcards
  • Erasure
As I had mentioned earlier, our focus will be to learn how to use libraries that are implemented with generics, and not how to create our own generified libraries.

Sun has a good tutorial to get started.

3 comments:

Anonymous said...

Sir please can i know the topic for tomorrow,s class.
And also i didnt attend the previous class on generics, so if you can give me some more references to read that.

Sorabh said...

Tutorial on generics

http://java.sun.com/j2se/1.5/pdf/generics-tutorial.pdf

Sorabh said...

how to use libraries that are implemented with generics...



http://people.csail.mit.edu/adonovan/pubs/oopsla04-generics.pdf