eclipse not inserting “diamond” operator in a java 8 project

后端 未结 6 625
轮回少年
轮回少年 2021-01-03 21:26

I have a maven project configured to use Java 8 and all works fine, eclipse compiles code like:

Map map = new HashMap<>();
         


        
6条回答
  •  执念已碎
    2021-01-03 21:58

    I observed this error when compiling with maven. To solve it, I had to fix my JAVA_HOME environment variable to the right JDK.

提交回复
热议问题