Eclipse gives me an error:
\'<>\' operator is not allowed for source level below 1.7
I guess this is because it is not using java 1
If you want to use below version, use
Map map = new HashMap();
instead of
HashMap map = new HashMap<>();