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

相关推荐
weixin199701080166 分钟前
加盟网 item_search - 根据关键词获取行业列表接口对接全攻略:从入门到精通
java·python
EliseL6 分钟前
SuperMap iObjects Java 如何将3DTiles数据转换为S3M三维瓦片
java·3d·三维
cyforkk7 分钟前
11、Java 基础硬核复习:常用类和基础API的核心逻辑与面试考点
java·python·面试
全栈师9 分钟前
java和C#的基本语法区别
java·开发语言·c#
小马爱打代码28 分钟前
Spring AI 实战:Agent 基础搭建与核心能力解析
java·人工智能·spring
csdn2015_29 分钟前
springboot task
java·spring boot·后端
czlczl2002092539 分钟前
Spring Boot :如何高性能地在 Filter 中获取响应体(Response Body)
java·spring boot·后端
sg_knight1 小时前
抽象工厂模式(Abstract Factory)
java·python·设计模式·抽象工厂模式·开发
春日见1 小时前
win11 分屏设置
java·开发语言·驱动开发·docker·单例模式·计算机外设
2301_780029041 小时前
支付宝sdk导入错误
java·开发语言·maven