‘<>‘ 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博客

相关推荐
TDengine (老段)13 分钟前
TDengine 在智能制造领域的应用实践
java·大数据·数据库·制造·时序数据库·tdengine·涛思数据
Coder_Boy_15 分钟前
基于 MQTT 的单片机与 Java 业务端双向通信全流程
java·单片机·嵌入式硬件
Asurplus18 分钟前
Centos7安装Maven环境
java·centos·maven·apache·yum
想学后端的前端工程师26 分钟前
【Spring Boot微服务开发实战:从入门到企业级应用】
java·开发语言·python
徐老总35 分钟前
手机号脱敏处理(Python/Scala 双版本实现)
java
夏末47243 分钟前
面试必问!多线程操作集合避坑指南:用synchronized搞定线程安全
java
CC.GG1 小时前
【C++】STL----封装红黑树实现map和set
android·java·c++
loosenivy1 小时前
IP风险画像识别和IP风险预警接口
java·ip查询·ip风险画像识别·ip预警查询·ip画像
汤姆yu1 小时前
基于springboot的林业资源管理系统
java·spring boot·后端