[Home] WorkersWiki a small wiki for independent developers. No login required; anyone can edit.

JavaGenericsNotes

Notes from moving a client codebase to Java 5 generics.

List<String> names = new ArrayList?<String>();
Map<String, List<Integer>> index = new HashMap?<String, List<Integer>>();

Eclipse 3.1 handles generics fine. Ant needs source="1.5" target="1.5" in javac or you get confusing errors about "generics are not supported in -source 1.3".

Effective Java 2nd edition (when it comes out) will apparently cover this well. Until then, the Sun tutorial by Gilad Bracha is good.


Edit text of this page | View other revisions
Last edited June 21, 2005 00:00 by Sabine (diff) | RecentSearches
Search: