The diamond operator in java 7 allows code like the following:
List list = new LinkedList<>();
However in Java 5/6, I c
The point for diamond operator is simply to reduce typing of code when declaring generic types. It doesn't have any effect on runtime whatsoever.
The only difference if you specify in Java 5 and 6,
List list = new ArrayList();
is that you have to specify @SuppressWarnings("unchecked")
to the list
(otherwise you will get an unchecked cast warning). My understanding is that diamond operator is trying to make development easier. It's got nothing to do on runtime execution of generics at all.