Background
My understanding of Java generics is it being completely a compile time feature (mainly focusing on type safety checks)
Java Generics uses something called type erasure, so no information
about the type is available at runtime. It is, however, possible to
create an instance of any class using Class.newInstance()
method if the type information can be passed somehow (in fact, this is the only way a generic array could be created)
Compile time safety is the primary goal of generics. But they can often be used to write more concise code as well, which would not have been possible otherwise
For a detailed treatment, I recommend the excellent book Java Generics and Collections