Simple to understand
Java7 introduces generics with diamond syntax, which simplifies generic programming. Such as:
List<String> list = new ArrayList<>();
Diving into Generics
- Using generics to declare classes, you can dynamically generate multiple logical subclasses, which are always the same class at runtime (only one class file).
- type wildcard
- generic method