What I cannot do with generics ?

My first brush with Java generics was around 3 years back when I found a prototype compiler from Gilad Bracha ( I think ). Though I never delved too deep into that, I recently realised that one way to learn generics is to check what java generics can’t do that C++ templates can.

I came across a “abstract subclass” that we can’t write using java. AFAIK this is not our regular
java subclass that is abstract. The “Curiously Recurring Template Pattern (CRTP)” is one such instance.

There is no point in trying this C++ template trick using generics because the type is erased. So the controversial type erasure can teach you a lot of things that you can do with Java generics.