GenericsExamples
GenericsExamples copied to clipboard
Replace usage of raw types with explicit type arguments
Your "Generics: How They Work and Why They Are Important" article says:
"...Raw types...it is not a good idea to use them..."
But then you use them in your own code:
List<GenericContainer> genericList = new ArrayList<GenericContainer>();
In my opinion, the following usage would, not only be better style, it would also be more type safe (aka, less error-prone):
List<GenericContainer<String>> genericList = ...;