‘<>‘ cannot be used with anonymous classes

'<>' cannot be used with anonymous classes

'<>'不能与匿名类一起使用

复制代码
Description	Resource	Path	Location	Type
'<>' cannot be used with anonymous classes	SearchHitSupport.java	/spring-data-elasticsearch/src/main/java/org/springframework/data/elasticsearch/core	line 95	Java Problem

java - Compile error: "'<>' cannot be used with anonymous classes" - Stack Overflow

But the Java compiler gives me the following error message:

复制代码
'<>' cannot be used with anonymous classes

Is there a fundamental reason for this? Or did the just skip the feature in JDK 7, maybe they do it in 8?

'<>' operator is not allowed for source level below 1.7_spencer_tseng的博客-CSDN博客

相关推荐
Zzzzmo_15 分钟前
【JavaEE】文件操作和IO
java·java-ee·io·文件操作·file·流对象
NE_STOP28 分钟前
Redis-持久化之RDB
java
苍煜1 小时前
SpringBoot AOP切面编程精讲:实现方式、Spring区别及与自定义注解生产实战
java·spring boot·spring
胡小禾1 小时前
企业内部文件处理方案
java
常利兵2 小时前
Spring Boot:别再重复造轮子,这些内置功能香麻了
java·spring boot·后端
咸鱼翻身小阿橙2 小时前
Qt QML调用C++注册类
java·c++·qt
逸Y 仙X2 小时前
文章二十一:ElasticSearch 词项查询与调度查询实战
java·大数据·数据库·elasticsearch·搜索引擎
Bechamz2 小时前
大数据开发学习Day25
java·大数据·学习
咖啡八杯3 小时前
GoF设计模式——单例模式
java