Where and when to use generics?
I'm brushing up on Java 5.0, I'm at 'generics' - I always hated c++ templates and knew they would catch up with me sooner or later...
I have a fairly simple question about where and how to use them, conceptually.
Am I correct in thinking that they are primarily concerned with items contained within a class and passed to a class?
I'm trying to find a useful bit of code to write to practice with them and I've been half tempted to re-write something that uses lots of inheritance simply because I know the code in question needed a lot of casting, but my gut feeling is that generics doesn't have an awful lot to do with inheritance and re-jigging a class that relied on inheritance to use generics is barking up the wrong tree.
I'd really appreciate some informed comments before I go trundling off down a path that is going to end with reams of pointless code.
Thanks,
Steve

